From b9ea7ba6fb5b4a33369d1a7b45dc4fc5c6ce98e3 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 11 Feb 2002 15:23:59 +0000 Subject: [PATCH] fixed bug #71181 p/text() would not work. A bit of cleanup. Daniel * libxslt/pattern.c: fixed bug #71181 p/text() would not work. A bit of cleanup. Daniel --- ChangeLog | 5 +++++ libxslt/pattern.c | 15 +++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cd8151c..32178e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Feb 11 16:22:36 CET 2002 Daniel Veillard + + * libxslt/pattern.c: fixed bug #71181 p/text() would not + work. A bit of cleanup. + Mon Feb 11 15:01:42 CET 2002 Daniel Veillard * xslt-config: fixing Red Hat bug #59508 diff --git a/libxslt/pattern.c b/libxslt/pattern.c index 7b8ad80..71a1844 100644 --- a/libxslt/pattern.c +++ b/libxslt/pattern.c @@ -457,8 +457,12 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp, } continue; case XSLT_OP_PARENT: - if ((node->type != XML_ELEMENT_NODE) && - (node->type != XML_ATTRIBUTE_NODE)) + if ((node->type == XML_DOCUMENT_NODE) || + (node->type == XML_HTML_DOCUMENT_NODE) || +#ifdef LIBXML_DOCB_ENABLED + (node->type == XML_DOCB_DOCUMENT_NODE) || +#endif + (node->type == XML_NAMESPACE_DECL)) return(0); node = node->parent; if (node == NULL) @@ -492,6 +496,13 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp, } if (node == NULL) return(0); + if ((node->type == XML_DOCUMENT_NODE) || + (node->type == XML_HTML_DOCUMENT_NODE) || +#ifdef LIBXML_DOCB_ENABLED + (node->type == XML_DOCB_DOCUMENT_NODE) || +#endif + (node->type == XML_NAMESPACE_DECL)) + return(0); node = node->parent; while (node != NULL) { if (node == NULL) -- 2.7.4