X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmarcmap.c;h=7b62c1ec5b47e4340f3b0f176f3d2031cd846838;hb=b9c889efbc310cfe669c497c8c5636ef9ad24934;hp=9cf0b0396e4e9dd04cb9b434acf4879134b7962d;hpb=77d92d3bfdc3190f65400a6786b3793eb95b8220;p=pazpar2-moved-to-github.git diff --git a/src/marcmap.c b/src/marcmap.c index 9cf0b03..7b62c1e 100644 --- a/src/marcmap.c +++ b/src/marcmap.c @@ -1,5 +1,5 @@ /* This file is part of Pazpar2. - Copyright (C) 2006-2009 Index Data + Copyright (C) 2006-2010 Index Data Pazpar2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -138,9 +138,11 @@ xmlDoc *marcmap_apply(struct marcmap *marcmap, xmlDoc *xml_in) struct marcmap *mmcur; xml_out = xmlNewDoc(BAD_CAST "1.0"); + xml_out->encoding = xmlCharStrdup("UTF-8"); 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 +216,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;