diff options
author | William M. Brack <wbrack@src.gnome.org> | 2003-08-18 06:50:15 +0000 |
---|---|---|
committer | William M. Brack <wbrack@src.gnome.org> | 2003-08-18 06:50:15 +0000 |
commit | 68a06e116b8645295c314dfad8cc2ba4926ef5b7 (patch) | |
tree | 422f3f807711b675c88a5f31e1695fe9812acbd2 /tests | |
parent | 7d0099e36a2275b0642e02c6d8bb1c8e9d860680 (diff) | |
download | libxslt-68a06e116b8645295c314dfad8cc2ba4926ef5b7.tar.gz libxslt-68a06e116b8645295c314dfad8cc2ba4926ef5b7.tar.bz2 libxslt-68a06e116b8645295c314dfad8cc2ba4926ef5b7.zip |
enhanced xsltInitCtxtKey to take care of multiple instances of a key with
* keys.c: enhanced xsltInitCtxtKey to take care of multiple
instances of a key with the same namespace:name, reported
on the mailing list by Ian Young. Added regression test
(bug-128).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/docs/Makefile.am | 1 | ||||
-rw-r--r-- | tests/docs/bug-128.xml | 26 | ||||
-rw-r--r-- | tests/general/Makefile.am | 1 | ||||
-rw-r--r-- | tests/general/bug-128.out | 5 | ||||
-rw-r--r-- | tests/general/bug-128.xsl | 26 |
5 files changed, 59 insertions, 0 deletions
diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am index 873b4b10..cf40b497 100644 --- a/tests/docs/Makefile.am +++ b/tests/docs/Makefile.am @@ -127,6 +127,7 @@ EXTRA_DIST = \ bug-125.xml \ bug-126.xml \ bug-127.xml \ + bug-128.xml \ character.xml \ array.xml \ items.xml diff --git a/tests/docs/bug-128.xml b/tests/docs/bug-128.xml new file mode 100644 index 00000000..0a3027d2 --- /dev/null +++ b/tests/docs/bug-128.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:test="http://www.example.org/test"> + <xsl:output method="xml" encoding="UTF-8" indent="yes"/> + + <xsl:key name="k" match="test:a" use="@a"/> + <xsl:key name="k" match="test:b" use="@b"/> + <xsl:key name="k" match="test.a" use="@a"/> + + <xsl:template match="/"> + <test:data> + <xsl:for-each select="key('k','1')"> + <xsl:copy-of select="."/> + </xsl:for-each> + </test:data> + </xsl:template> + + <xsl:template match="text()|@*"/> + + <test:data> + <test:a a="1"/> + <test:b b="1"/> + </test:data> +</xsl:stylesheet> + diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index a37d4495..300235af 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -132,6 +132,7 @@ EXTRA_DIST = \ bug-125.out bug-125.xsl \ bug-126.out bug-126.xsl \ bug-127.out bug-127.xsl \ + bug-128.out bug-128.xsl \ character.out character.xsl \ character2.out character2.xsl \ itemschoose.out itemschoose.xsl \ diff --git a/tests/general/bug-128.out b/tests/general/bug-128.out new file mode 100644 index 00000000..31a5e2e9 --- /dev/null +++ b/tests/general/bug-128.out @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<test:data xmlns:test="http://www.example.org/test"> + <test:a a="1"/> + <test:b b="1"/> +</test:data> diff --git a/tests/general/bug-128.xsl b/tests/general/bug-128.xsl new file mode 100644 index 00000000..0a3027d2 --- /dev/null +++ b/tests/general/bug-128.xsl @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:test="http://www.example.org/test"> + <xsl:output method="xml" encoding="UTF-8" indent="yes"/> + + <xsl:key name="k" match="test:a" use="@a"/> + <xsl:key name="k" match="test:b" use="@b"/> + <xsl:key name="k" match="test.a" use="@a"/> + + <xsl:template match="/"> + <test:data> + <xsl:for-each select="key('k','1')"> + <xsl:copy-of select="."/> + </xsl:for-each> + </test:data> + </xsl:template> + + <xsl:template match="text()|@*"/> + + <test:data> + <test:a a="1"/> + <test:b b="1"/> + </test:data> +</xsl:stylesheet> + |