fixed bug #71181 p/text() would not work. A bit of cleanup. Daniel
authorDaniel Veillard <veillard@src.gnome.org>
Mon, 11 Feb 2002 15:23:59 +0000 (15:23 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Mon, 11 Feb 2002 15:23:59 +0000 (15:23 +0000)
* libxslt/pattern.c: fixed bug #71181 p/text() would not
  work. A bit of cleanup.
Daniel

ChangeLog
libxslt/pattern.c

index cd8151c..32178e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Feb 11 16:22:36 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+       * 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 <daniel@veillard.com>
 
        * xslt-config: fixing Red Hat bug #59508
index 7b8ad80..71a1844 100644 (file)
@@ -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)