From: Jason Skomorowski Date: Tue, 10 Nov 2009 15:00:56 +0000 (-0500) Subject: put root element in pz namespace in marcmap output X-Git-Tag: v1.2.3~2^2~2 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=e21851ef5461875e3929605afe79f23be86c2404;p=pazpar2-moved-to-github.git put root element in pz namespace in marcmap output --- diff --git a/src/marcmap.c b/src/marcmap.c index 9cf0b03..6b5c42e 100644 --- a/src/marcmap.c +++ b/src/marcmap.c @@ -141,6 +141,7 @@ xmlDoc *marcmap_apply(struct marcmap *marcmap, xmlDoc *xml_in) xml_out_root = xmlNewNode(NULL, BAD_CAST "record"); xmlDocSetRootElement(xml_out, xml_out_root); ns_pz = xmlNewNs(xml_out_root, BAD_CAST "http://www.indexdata.com/pazpar2/1.0", BAD_CAST "pz"); + xmlSetNs(xml_out_root, ns_pz); nmem = nmem_create(); rec_node = xmlDocGetRootElement(xml_in); marchash = marchash_create(nmem); @@ -214,7 +215,7 @@ xmlDoc *marcmap_apply(struct marcmap *marcmap, xmlDoc *xml_in) strncat(mergekey, " medium ", 1023 - strlen(mergekey)); strncat(mergekey, medium, 1023 - strlen(mergekey)); - xmlSetProp(xml_out_root, BAD_CAST "mergekey", BAD_CAST mergekey); +// xmlSetProp(xml_out_root, BAD_CAST "mergekey", BAD_CAST mergekey); nmem_destroy(nmem); return xml_out;