summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-11-20 10:02:08 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-11-20 10:02:08 +0000
commit16130f7179d6c6b7de782422fa28b53846493bc7 (patch)
treeffd698bd94d57de09688dbe98ae092ce440b8cb5
parentc7d1398e49a7858195b4b8e0b9832ded1fb9f169 (diff)
downloadlibxslt-16130f7179d6c6b7de782422fa28b53846493bc7.tar.gz
libxslt-16130f7179d6c6b7de782422fa28b53846493bc7.tar.bz2
libxslt-16130f7179d6c6b7de782422fa28b53846493bc7.zip
fixed an error from #120684 patch raised in #127450 added tests to the
* 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
-rw-r--r--ChangeLog12
-rw-r--r--libxslt/keys.c4
-rw-r--r--tests/docs/Makefile.am1
-rw-r--r--tests/docs/bug-134.xml5
-rw-r--r--tests/general/Makefile.am1
-rw-r--r--tests/general/bug-134.out2
-rw-r--r--tests/general/bug-134.xsl12
7 files changed, 33 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 869523f9..8db6d45f 100644
--- 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
diff --git a/libxslt/keys.c b/libxslt/keys.c
index 3f5ced2f..953163c5 100644
--- a/libxslt/keys.c
+++ b/libxslt/keys.c
@@ -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,
diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am
index ed02e581..56ee1e0e 100644
--- a/tests/docs/Makefile.am
+++ b/tests/docs/Makefile.am
@@ -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
index 00000000..9d5f51f9
--- /dev/null
+++ b/tests/docs/bug-134.xml
@@ -0,0 +1,5 @@
+<root>
+ <sect><h1 /></sect>
+ <sect><h2 /></sect>
+ <sect><h3 /></sect>
+</root>
diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am
index c24faa03..9176ab54 100644
--- a/tests/general/Makefile.am
+++ b/tests/general/Makefile.am
@@ -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
index 00000000..1b5625cd
--- /dev/null
+++ b/tests/general/bug-134.out
@@ -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
index 00000000..401700a0
--- /dev/null
+++ b/tests/general/bug-134.xsl
@@ -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>