Fixing bug #75777 error with namespaced attribute match rules evaluation
authorDaniel Veillard <veillard@src.gnome.org>
Fri, 22 Mar 2002 15:15:36 +0000 (15:15 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Fri, 22 Mar 2002 15:15:36 +0000 (15:15 +0000)
* libxslt/pattern.c: Fixing bug #75777 error with namespaced
  attribute match rules evaluation
* tests/docs/Makefile.am tests/docs/bug-78.xml
  tests/general/Makefile.am tests/general/bug-78.*: added a
  specific example for bug #75777 in the regression tests
Daniel

ChangeLog
doc/libxslt-api.xml
doc/libxslt-decl.txt
doc/libxslt-refs.xml
libxslt/pattern.c
tests/docs/Makefile.am
tests/docs/bug-78.xml [new file with mode: 0644]
tests/general/Makefile.am
tests/general/bug-78.out [new file with mode: 0644]
tests/general/bug-78.xsl [new file with mode: 0644]

index f75938c..65b6fdd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Mar 22 16:13:22 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+       * libxslt/pattern.c: Fixing bug #75777 error with namespaced
+         attribute match rules evaluation
+       * tests/docs/Makefile.am tests/docs/bug-78.xml
+         tests/general/Makefile.am tests/general/bug-78.*: added a 
+         specific example for bug #75777 in the regression tests
+       
 Thu Mar 21 17:19:56 CET 2002 Daniel Veillard <daniel@veillard.com>
 
        * libxslt/transform.c: found another stupid bug by step by 
index 006888b..667f28a 100644 (file)
@@ -42,7 +42,6 @@
      <exports symbol='LIBXSLT_PUBLIC'/>
     </file>
     <file name='libxslt'>
-     <exports symbol='IN_LIBXSLT'/>
      <exports symbol='LIBXSLT_PUBLIC'/>
     </file>
     <file name='numbersInternals'>
     <macro name='DEBUG_MEMORY_LOCATION' file='xsltwin32config'>
       <info>should be activated only when debugging libxslt. DEBUG_MEMORY_LOCATION should be activated only when libxml has been configured with --with-debug-mem too</info>
     </macro>
-    <macro name='IN_LIBXSLT' file='libxslt'>
-    </macro>
     <macro name='IS_XSLT_ELEM' file='xsltutils'>
       <info>Checks that the element pertains to XSLT namespace.</info>
     </macro>
index 0591a30..92c915e 100644 (file)
@@ -1,14 +1,14 @@
 <MACRO>
 <NAME>LIBXSLT_DOTTED_VERSION</NAME>
-#define LIBXSLT_DOTTED_VERSION "1.0.13"
+#define LIBXSLT_DOTTED_VERSION "1.0.14"
 </MACRO>
 <MACRO>
 <NAME>LIBXSLT_VERSION</NAME>
-#define LIBXSLT_VERSION 10013
+#define LIBXSLT_VERSION 10014
 </MACRO>
 <MACRO>
 <NAME>LIBXSLT_VERSION_STRING</NAME>
-#define LIBXSLT_VERSION_STRING "10013"
+#define LIBXSLT_VERSION_STRING "10014"
 </MACRO>
 <MACRO>
 <NAME>WITH_XSLT_DEBUG</NAME>
@@ -454,10 +454,6 @@ xsltStylesheetPtr style
 xsltDocumentPtr doc
 </FUNCTION>
 <MACRO>
-<NAME>IN_LIBXSLT</NAME>
-#define IN_LIBXSLT
-</MACRO>
-<MACRO>
 <NAME>LIBXSLT_PUBLIC</NAME>
 #define LIBXSLT_PUBLIC __declspec(dllimport)
 </MACRO>
@@ -1557,15 +1553,15 @@ void
 </FUNCTION>
 <MACRO>
 <NAME>LIBXSLT_DOTTED_VERSION</NAME>
-#define LIBXSLT_DOTTED_VERSION "1.0.13"
+#define LIBXSLT_DOTTED_VERSION "1.0.14"
 </MACRO>
 <MACRO>
 <NAME>LIBXSLT_VERSION</NAME>
-#define LIBXSLT_VERSION 10013
+#define LIBXSLT_VERSION 10014
 </MACRO>
 <MACRO>
 <NAME>LIBXSLT_VERSION_STRING</NAME>
-#define LIBXSLT_VERSION_STRING "10013"
+#define LIBXSLT_VERSION_STRING "10014"
 </MACRO>
 <MACRO>
 <NAME>WITH_XSLT_DEBUG</NAME>
index e30a5e3..6ec98b8 100644 (file)
@@ -7,7 +7,6 @@
     <reference name='CHECK_STOPPEDE' href='html/libxslt-xsltinternals.html#CHECK-STOPPEDE-CAPS'/>
     <reference name='DEBUG_MEMORY' href='html/libxslt-xsltconfig.html#DEBUG-MEMORY-CAPS'/>
     <reference name='DEBUG_MEMORY_LOCATION' href='html/libxslt-xsltconfig.html#DEBUG-MEMORY-LOCATION-CAPS'/>
-    <reference name='IN_LIBXSLT' href='html/libxslt-libxslt.html#IN-LIBXSLT-CAPS'/>
     <reference name='IS_XSLT_ELEM' href='html/libxslt-xsltutils.html#IS-XSLT-ELEM-CAPS'/>
     <reference name='IS_XSLT_NAME' href='html/libxslt-xsltutils.html#IS-XSLT-NAME-CAPS'/>
     <reference name='IS_XSLT_REAL_NODE' href='html/libxslt-xsltutils.html#IS-XSLT-REAL-NODE-CAPS'/>
     <ref name='DEBUG_MEMORY_LOCATION'/>
     </letter>
     <letter name='I'>
-    <ref name='IN_LIBXSLT'/>
     <ref name='IS_XSLT_ELEM'/>
     <ref name='IS_XSLT_NAME'/>
     <ref name='IS_XSLT_REAL_NODE'/>
       <ref name='xsltFreeDocumentKeys'/>
     </file>
     <file name='libxslt'>
-      <ref name='IN_LIBXSLT'/>
       <ref name='LIBXSLT_PUBLIC'/>
     </file>
     <file name='namespaces'>
index a2292b2..4928581 100644 (file)
@@ -455,20 +455,17 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
             case XSLT_OP_ATTR:
                if (node->type != XML_ATTRIBUTE_NODE)
                    return(0);
-               if (step->value == NULL)
-                   continue;
-               if (step->value[0] != node->name[0])
-                   return(0);
-               if (!xmlStrEqual(step->value, node->name))
-                   return(0);
-
+               if (step->value != NULL) {
+                   if (step->value[0] != node->name[0])
+                       return(0);
+                   if (!xmlStrEqual(step->value, node->name))
+                       return(0);
+               }
                /* Namespace test */
                if (node->ns == NULL) {
                    if (step->value2 != NULL)
                        return(0);
-               } else if (node->ns->href != NULL) {
-                   if (step->value2 == NULL)
-                       return(0);
+               } else if (step->value2 != NULL) {
                    if (!xmlStrEqual(step->value2, node->ns->href))
                        return(0);
                }
index aacbaed..d7cfa7c 100644 (file)
@@ -78,6 +78,7 @@ EXTRA_DIST =  \
        bug-75.xml \
        bug-76.xml \
        bug-77.xml \
+       bug-78.xml \
        character.xml \
        array.xml \
        items.xml
diff --git a/tests/docs/bug-78.xml b/tests/docs/bug-78.xml
new file mode 100644 (file)
index 0000000..c598794
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<userView>
+  <navigation>
+    <category name="europe" id="91">
+      tototo
+    </category>
+  </navigation>
+</userView>
index e33e242..2704a5c 100644 (file)
@@ -81,6 +81,7 @@ EXTRA_DIST = \
     bug-75.out bug-75.xsl \
     bug-76.out bug-76.xsl \
     bug-77.out bug-77.xsl \
+    bug-78.out bug-78.xsl \
     character.out character.xsl \
     character2.out character2.xsl \
     itemschoose.out itemschoose.xsl \
diff --git a/tests/general/bug-78.out b/tests/general/bug-78.out
new file mode 100644 (file)
index 0000000..666454c
--- /dev/null
@@ -0,0 +1,3 @@
+
+      tototo
+    
diff --git a/tests/general/bug-78.xsl b/tests/general/bug-78.xsl
new file mode 100644 (file)
index 0000000..b2640ff
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xi="http://www.toto.com/xinclude" version="1.0">
+  <xsl:output encoding="ISO-8859-1" method="html"/>
+  <xsl:strip-space elements="*"/>
+  <xsl:template match="/">
+    <xsl:apply-templates/>
+  </xsl:template>
+  <xsl:template match="xi:*">
+    <xsl:copy>
+      <xsl:apply-templates select="node()|@*"/>
+    </xsl:copy>
+  </xsl:template>
+  <xsl:template match="@xi:*">
+    <xsl:copy/>
+  </xsl:template>
+</xsl:stylesheet>