summaryrefslogtreecommitdiff
path: root/tests/general
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2005-03-31 09:56:13 +0000
committerDaniel Veillard <veillard@src.gnome.org>2005-03-31 09:56:13 +0000
commit9f4e6d5779c6a1ebf946b670bbf6739d30da7b2c (patch)
tree8cec5c0a40c3c8e1c3b21d4d0dd1a9113f82f55a /tests/general
parentd8d8ecd5f45ac3d5b7a51cd80bd45592dfadc162 (diff)
downloadlibxslt-9f4e6d5779c6a1ebf946b670bbf6739d30da7b2c.tar.gz
libxslt-9f4e6d5779c6a1ebf946b670bbf6739d30da7b2c.tar.bz2
libxslt-9f4e6d5779c6a1ebf946b670bbf6739d30da7b2c.zip
fixed bug #171488 with cascading select in patterns. added test provided
* libxslt/pattern.c: fixed bug #171488 with cascading select in patterns. * tests/general/bug-161.*, tests/general/Makefile.am, tests/docs/bug-161.*, tests/docs/Makefile.am: added test provided by Ben Ko Daniel
Diffstat (limited to 'tests/general')
-rw-r--r--tests/general/Makefile.am1
-rw-r--r--tests/general/bug-161.out6
-rw-r--r--tests/general/bug-161.xsl18
3 files changed, 25 insertions, 0 deletions
diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am
index 733f9cfb..0f5a89ba 100644
--- a/tests/general/Makefile.am
+++ b/tests/general/Makefile.am
@@ -169,6 +169,7 @@ EXTRA_DIST = \
bug-158.out bug-158.xsl \
bug-159.out bug-159.xsl \
bug-160.out bug-160.xsl \
+ bug-161.out bug-161.xsl \
character.out character.xsl \
character2.out character2.xsl \
itemschoose.out itemschoose.xsl \
diff --git a/tests/general/bug-161.out b/tests/general/bug-161.out
new file mode 100644
index 00000000..20b15167
--- /dev/null
+++ b/tests/general/bug-161.out
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+
+test
+test
+First element of last item of orderedlist<para>test</para>
+
diff --git a/tests/general/bug-161.xsl b/tests/general/bug-161.xsl
new file mode 100644
index 00000000..91bfe7ff
--- /dev/null
+++ b/tests/general/bug-161.xsl
@@ -0,0 +1,18 @@
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<xsl:output method="xml" />
+
+<!--match first element of last item of any orderedlist-->
+<!-- <xsl:template match="orderedlist/listitem[position()!=1][position()=last()]/*[1]"> -->
+<xsl:template match="orderedlist/listitem[position()!=1][position()=last()]/*[1]">
+ <xsl:text>First element of last item of orderedlist</xsl:text>
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
+
+