From e21851ef5461875e3929605afe79f23be86c2404 Mon Sep 17 00:00:00 2001 From: Jason Skomorowski Date: Tue, 10 Nov 2009 10:00:56 -0500 Subject: [PATCH] put root element in pz namespace in marcmap output --- src/marcmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 1.7.10.4