diff options
Diffstat (limited to 'tests/general')
-rw-r--r-- | tests/general/Makefile.am | 1 | ||||
-rw-r--r-- | tests/general/bug-161.out | 6 | ||||
-rw-r--r-- | tests/general/bug-161.xsl | 18 |
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> + + |