fixed an error from #120684 patch raised in #127450 added tests to the
authorDaniel Veillard <veillard@src.gnome.org>
Thu, 20 Nov 2003 10:02:08 +0000 (10:02 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Thu, 20 Nov 2003 10:02:08 +0000 (10:02 +0000)
* libxslt/keys.c: fixed an error from #120684 patch raised in
  #127450
* tests/docs/Makefile.am tests/docs/bug-134.xml
  tests/general/Makefile.am tests/docs/bug-134*: added tests
  to the regression suite for bug #127450.
Daniel

ChangeLog
libxslt/keys.c
tests/docs/Makefile.am
tests/docs/bug-134.xml [new file with mode: 0644]
tests/general/Makefile.am
tests/general/bug-134.out [new file with mode: 0644]
tests/general/bug-134.xsl [new file with mode: 0644]

index 869523f..8db6d45 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,17 @@
+Thu Nov 20 10:59:48 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+       * libxslt/keys.c: fixed an error from #120684 patch raised in
+         #127450
+       * tests/docs/Makefile.am tests/docs/bug-134.xml
+         tests/general/Makefile.am tests/docs/bug-134*: added tests
+         to the regression suite for bug #127450.
+       
 Thu Nov 20 00:22:14 CET 2003 Daniel Veillard <daniel@veillard.com>
 
        * libxslt/keys.c: fixed a bug in the keys selector parsing
          #120684 when | is in a predicate or a string.
-       * tests/docs/Makefile.am tests/docs/bug-132.xml
-         tests/general/Makefile.am tests/docs/bug-132*: added tests
+       * tests/docs/Makefile.am tests/docs/bug-133.xml
+         tests/general/Makefile.am tests/docs/bug-133*: added tests
          to the regression suite for bug #120684.
        * Makefile.am: don't package cvs temp files
        * doc/apibuild.py: update from libxml2 one
index 3f5ced2..953163c 100644 (file)
@@ -318,8 +318,8 @@ xsltAddKey(xsltStylesheetPtr style, const xmlChar *name,
                    xsltTransformError(NULL, style, inst,
                                       "key pattern is malformed: %s",
                                       key->match);
-           }
-           end++;
+           } else
+               end++;
        }
        if (current == end) {
            xsltTransformError(NULL, style, inst,
index ed02e58..56ee1e0 100644 (file)
@@ -133,6 +133,7 @@ EXTRA_DIST =        \
        bug-131.xml \
        bug-132.xml \
        bug-133.xml \
+       bug-134.xml \
        character.xml \
        array.xml \
        items.xml
diff --git a/tests/docs/bug-134.xml b/tests/docs/bug-134.xml
new file mode 100644 (file)
index 0000000..9d5f51f
--- /dev/null
@@ -0,0 +1,5 @@
+<root>
+  <sect><h1 /></sect>
+  <sect><h2 /></sect>
+  <sect><h3 /></sect>
+</root>
index c24faa0..9176ab5 100644 (file)
@@ -139,6 +139,7 @@ EXTRA_DIST = \
     bug-131.out bug-131.xsl bug-131-imp.imp \
     bug-132.out bug-132.xsl \
     bug-133.out bug-133.xsl \
+    bug-134.out bug-134.xsl \
     character.out character.xsl \
     character2.out character2.xsl \
     itemschoose.out itemschoose.xsl \
diff --git a/tests/general/bug-134.out b/tests/general/bug-134.out
new file mode 100644 (file)
index 0000000..1b5625c
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<result>2</result>
diff --git a/tests/general/bug-134.xsl b/tests/general/bug-134.xsl
new file mode 100644 (file)
index 0000000..401700a
--- /dev/null
@@ -0,0 +1,12 @@
+<xsl:stylesheet version="1.0" 
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       
+<xsl:key name="test" match="node()[self::sect][h1|h2]" use="'test'" />
+
+<xsl:template match="/">
+  <result>
+    <xsl:value-of select="count(key('test','test'))" />
+  </result>
+</xsl:template>
+
+</xsl:stylesheet>