From 06092dfad52c9ccc266ea6168a29267c780ec35b Mon Sep 17 00:00:00 2001 From: "William M. Brack" Date: Tue, 18 Nov 2003 05:57:38 +0000 Subject: [PATCH] fixed entity problem in exslt:tokenize uncovered by newapi.xsl changed to * libexslt/strings.c: fixed entity problem in exslt:tokenize uncovered by newapi.xsl * libxslt/transform.c,libxslt/pattern.c,libxslt/keys.c: changed to use IS_BLANK_CH for char compares (fixes warnings) --- ChangeLog | 7 +++++++ libexslt/strings.c | 6 +++--- libxslt/keys.c | 2 +- libxslt/pattern.c | 4 ++-- libxslt/transform.c | 4 ++-- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0fcc533..3bc4cea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Nov 18 13:42:12 HKT 2003 William Brack + + * libexslt/strings.c: fixed entity problem in exslt:tokenize + uncovered by newapi.xsl + * libxslt/transform.c,libxslt/pattern.c,libxslt/keys.c: changed + to use IS_BLANK_CH for char compares (fixes warnings) + Fri Nov 14 23:59:08 CET 2003 Daniel Veillard * libxslt/preproc.c: applied fix from Bjorn Reese to close diff --git a/libexslt/strings.c b/libexslt/strings.c index 9acfee9..89801b2 100644 --- a/libexslt/strings.c +++ b/libexslt/strings.c @@ -94,9 +94,9 @@ exsltStrTokenizeFunction(xmlXPathParserContextPtr ctxt, int nargs) } } if (token != cur) { - node = - xmlNewChild((xmlNodePtr) container, NULL, - (const xmlChar *) "token", token); + node = xmlNewDocRawNode(container, NULL, + (const xmlChar *) "token", token); + xmlAddChild((xmlNodePtr) container, node); xmlXPathNodeSetAddUnique(ret->nodesetval, node); } } diff --git a/libxslt/keys.c b/libxslt/keys.c index f3a1f63..ad210a1 100644 --- a/libxslt/keys.c +++ b/libxslt/keys.c @@ -256,7 +256,7 @@ xsltAddKey(xsltStylesheetPtr style, const xmlChar *name, current = end = 0; while (match[current] != 0) { start = current; - while (IS_BLANK(match[current])) + while (IS_BLANK_CH(match[current])) current++; end = current; while ((match[end] != 0) && (match[end] != '|')) { diff --git a/libxslt/pattern.c b/libxslt/pattern.c index e7d4a51..1914caa 100644 --- a/libxslt/pattern.c +++ b/libxslt/pattern.c @@ -1027,7 +1027,7 @@ xsltTestCompMatchList(xsltTransformContextPtr ctxt, xmlNodePtr node, #define CUR_PTR ctxt->cur #define SKIP_BLANKS \ - while (IS_BLANK(CUR)) NEXT + while (IS_BLANK_CH(CUR)) NEXT #define CURRENT (*ctxt->cur) #define NEXT ((*ctxt->cur) ? ctxt->cur++: ctxt->cur) @@ -1729,7 +1729,7 @@ xsltCompilePattern(const xmlChar *pattern, xmlDocPtr doc, current = end = 0; while (pattern[current] != 0) { start = current; - while (IS_BLANK(pattern[current])) + while (IS_BLANK_CH(pattern[current])) current++; end = current; level = 0; diff --git a/libxslt/transform.c b/libxslt/transform.c index 442112c..b107cfe 100644 --- a/libxslt/transform.c +++ b/libxslt/transform.c @@ -2059,12 +2059,12 @@ xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNodePtr node, element = elements; while (*element != 0) { - while (IS_BLANK(*element)) + while (IS_BLANK_CH(*element)) element++; if (*element == 0) break; end = element; - while ((*end != 0) && (!IS_BLANK(*end))) + while ((*end != 0) && (!IS_BLANK_CH(*end))) end++; element = xmlStrndup(element, end - element); if (element) { -- 2.7.4