From c5365d8095f29747f5998028934cfc034d038673 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 12 Feb 2007 10:33:50 +0000 Subject: [PATCH] Fixed bug #884: Entity declarations in input are lost at retrieval time. --- NEWS | 2 ++ index/alvis.c | 8 ++++---- index/mod_dom.c | 9 +++++---- test/xslt/marc-col.xml | 5 ++++- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 2d48905..2eeb876 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +Fixed bug #884: Entity declarations in input are lost at retrieval time. + Implemented new filter 'dom'. See test/xslt/dom-config*xml for examples. This, like alvis, performs indexing and retrieval using XSLT. But Unlike alvis, it allows multiple XSLT steps to be performed and does ISO2709 diff --git a/index/alvis.c b/index/alvis.c index 60beaca..fad3671 100644 --- a/index/alvis.c +++ b/index/alvis.c @@ -1,4 +1,4 @@ -/* $Id: alvis.c,v 1.11 2007-01-15 15:10:16 adam Exp $ +/* $Id: alvis.c,v 1.12 2007-02-12 10:33:51 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -507,7 +507,7 @@ static int extract_split(struct filter_info *tinfo, struct recExtractCtrl *p) p /* I/O handler */, 0 /* URL */, 0 /* encoding */, - XML_PARSE_XINCLUDE); + XML_PARSE_XINCLUDE|XML_PARSE_NOENT); } if (!tinfo->reader) return RECCTRL_EXTRACT_ERROR_GENERIC; @@ -550,7 +550,7 @@ static int extract_full(struct filter_info *tinfo, struct recExtractCtrl *p) xmlDocPtr doc = xmlReadIO(ioread_ex, ioclose_ex, p /* I/O handler */, 0 /* URL */, 0 /* encoding */, - XML_PARSE_XINCLUDE); + XML_PARSE_XINCLUDE|XML_PARSE_NOENT); if (!doc) { return RECCTRL_EXTRACT_ERROR_GENERIC; @@ -694,7 +694,7 @@ static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p) doc = xmlReadIO(ioread_ret, ioclose_ret, p /* I/O handler */, 0 /* URL */, 0 /* encoding */, - XML_PARSE_XINCLUDE); + XML_PARSE_XINCLUDE|XML_PARSE_NOENT); if (!doc) { p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; diff --git a/index/mod_dom.c b/index/mod_dom.c index d42d80b..102a51a 100644 --- a/index/mod_dom.c +++ b/index/mod_dom.c @@ -1,4 +1,4 @@ -/* $Id: mod_dom.c,v 1.1 2007-02-07 12:08:54 adam Exp $ +/* $Id: mod_dom.c,v 1.2 2007-02-12 10:33:51 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -794,7 +794,8 @@ static int extract_xml_split(struct filter_info *tinfo, p /* I/O handler */, 0 /* URL */, 0 /* encoding */, - XML_PARSE_XINCLUDE); + XML_PARSE_XINCLUDE| + XML_PARSE_NOENT); } if (!input->u.xmlreader.reader) return RECCTRL_EXTRACT_ERROR_GENERIC; @@ -840,7 +841,7 @@ static int extract_xml_full(struct filter_info *tinfo, xmlDocPtr doc = xmlReadIO(ioread_ex, ioclose_ex, p /* I/O handler */, 0 /* URL */, 0 /* encoding */, - XML_PARSE_XINCLUDE); + XML_PARSE_XINCLUDE|XML_PARSE_NOENT); if (!doc) { return RECCTRL_EXTRACT_ERROR_GENERIC; @@ -995,7 +996,7 @@ static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p) doc = xmlReadIO(ioread_ret, ioclose_ret, p /* I/O handler */, 0 /* URL */, 0 /* encoding */, - XML_PARSE_XINCLUDE); + XML_PARSE_XINCLUDE|XML_PARSE_NOENT); if (!doc) { p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; diff --git a/test/xslt/marc-col.xml b/test/xslt/marc-col.xml index c5d527f..71e8a77 100644 --- a/test/xslt/marc-col.xml +++ b/test/xslt/marc-col.xml @@ -1,3 +1,6 @@ + +]> 1 @@ -20,7 +23,7 @@ Jack Collins - How to program a computer + How to program a &com; Penguin -- 1.7.10.4