diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2002-10-17 14:34:07 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2002-10-17 14:34:07 +0000 |
commit | 95c0361ca65d06b86b67c6f1b22656be9154dd0c (patch) | |
tree | a4437a31278b46050765d6d2226e9c338c22e01c /tests/general/bug-94.xsl | |
parent | a2c84902867c12e3835081384e2f260a0603b20c (diff) | |
download | libxslt-95c0361ca65d06b86b67c6f1b22656be9154dd0c.tar.gz libxslt-95c0361ca65d06b86b67c6f1b22656be9154dd0c.tar.bz2 libxslt-95c0361ca65d06b86b67c6f1b22656be9154dd0c.zip |
fixed bug #86421 added the example in the regression tests for this case
* libxslt/variables.c: fixed bug #86421
* tests/docs/Makefile.am tests/docs/bug-94.xml
tests/general/Makefile.am tests/general/bug-94.*: added the
example in the regression tests for this case
Daniel
Diffstat (limited to 'tests/general/bug-94.xsl')
-rw-r--r-- | tests/general/bug-94.xsl | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/general/bug-94.xsl b/tests/general/bug-94.xsl new file mode 100644 index 00000000..2cb2ff46 --- /dev/null +++ b/tests/general/bug-94.xsl @@ -0,0 +1,35 @@ +<xsl:stylesheet version = '1.0' + xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> +<!-- borrowed from http://www.zvon.org/xxl/XSLTutorial/Output/example35_ch9.html --> + +<xsl:template match="/"> + <TABLE> + <xsl:for-each select="//number"> + <TR> + <TH> + <xsl:choose> + <xsl:when test="text() mod 2"> + <xsl:apply-templates select="."> + <xsl:with-param name="type">odd</xsl:with-param> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="."/> + </xsl:otherwise> + </xsl:choose> + </TH> + </TR> + </xsl:for-each> + </TABLE> +</xsl:template> + +<xsl:template match="number"> + <xsl:variable name="type">even</xsl:variable> + <xsl:value-of select="."/> + <xsl:text> (</xsl:text> + <xsl:value-of select="$type"/> + <xsl:text>)</xsl:text> +</xsl:template> + + +</xsl:stylesheet> |