try to fix #153137 but without a test case it's shooting in the dark.
authorDaniel Veillard <veillard@src.gnome.org>
Wed, 29 Sep 2004 13:43:13 +0000 (13:43 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Wed, 29 Sep 2004 13:43:13 +0000 (13:43 +0000)
* libxslt/pattern.c: try to fix #153137 but without a test case
  it's shooting in the dark.
Daniel

ChangeLog
libxslt/pattern.c

index 5a0d344..ed54771 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Sep 29 15:42:33 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+       * libxslt/pattern.c: try to fix #153137 but without a test case
+         it's shooting in the dark.
+
 Tue Sep 28 16:20:48 CEST 2004 Daniel Veillard <daniel@veillard.com>
 
        * doc/tutorial2/libxslt_pipes.*: New tutorial from Panagiotis Louridas
index 68259cd..477b514 100644 (file)
@@ -770,7 +770,9 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
                             * If the node is in a Value Tree we cannot
                             * cache it !
                             */
-                           if (node->doc != NULL) {
+                           if ((node->doc != NULL) &&
+                               (node->doc->name != NULL) &&
+                               (node->doc->name[0] != ' ')) {
                                len = (int)
                                    XSLT_RUNTIME_EXTRA(ctxt, select->lenExtra);
                                XSLT_RUNTIME_EXTRA(ctxt,
@@ -875,7 +877,9 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
                             * If the node is in a Value Tree we cannot
                             * cache it !
                             */
-                           if (node->doc != NULL) {
+                           if ((node->doc != NULL) &&
+                               (node->doc->name != NULL) &&
+                               (node->doc->name[0] != ' ')) {
                                len = (int)
                                    XSLT_RUNTIME_EXTRA(ctxt, select->lenExtra);
                                XSLT_RUNTIME_EXTRA(ctxt,