From: Adam Dickmeiss Date: Wed, 9 Jul 2008 09:47:16 +0000 (+0200) Subject: Replace z:meta node with embedded record instead of adding it. X-Git-Tag: v2.0.34~45 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=d6de35596bb0dc4410fc59cc5e1abc18b911fc0e;p=idzebra-moved-to-github.git Replace z:meta node with embedded record instead of adding it. --- diff --git a/index/mod_dom.c b/index/mod_dom.c index 95c8a06..ad97171 100644 --- a/index/mod_dom.c +++ b/index/mod_dom.c @@ -399,11 +399,11 @@ static int process_meta(struct filter_info *tinfo, xmlDocPtr doc, xmlNodePtr nod if (ret == 0) { xmlDocPtr sub_doc = - xmlParseMemory( wrbuf_buf(result), wrbuf_len(result)); + xmlParseMemory(wrbuf_buf(result), wrbuf_len(result)); if (sub_doc) { xmlNodePtr t = xmlDocGetRootElement(sub_doc); - xmlAddChild(node, xmlCopyNode(t, 1)); + xmlReplaceNode(node, xmlCopyNode(t, 1)); xmlFreeDoc(sub_doc); } } diff --git a/test/xslt/dom1.c b/test/xslt/dom1.c index 10c4834..957b83a 100644 --- a/test/xslt/dom1.c +++ b/test/xslt/dom1.c @@ -80,10 +80,9 @@ void tst(int argc, char **argv) zh, "snippet", yaz_oid_recsyn_xml, "\n" "\n" - " " - "\n" + " \n" " How to program a computer\n" - "\n" + "\n" " How to program a computer\n" "\n"), ZEBRA_OK);