From d6de35596bb0dc4410fc59cc5e1abc18b911fc0e Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 9 Jul 2008 11:47:16 +0200 Subject: [PATCH] Replace z:meta node with embedded record instead of adding it. --- index/mod_dom.c | 4 ++-- test/xslt/dom1.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) 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); -- 1.7.10.4