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 | |
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')
-rw-r--r-- | tests/docs/Makefile.am | 1 | ||||
-rw-r--r-- | tests/docs/bug-94.xml | 9 | ||||
-rw-r--r-- | tests/general/Makefile.am | 1 | ||||
-rw-r--r-- | tests/general/bug-94.out | 2 | ||||
-rw-r--r-- | tests/general/bug-94.xsl | 35 |
5 files changed, 48 insertions, 0 deletions
diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am index 9cb56faa..44384445 100644 --- a/tests/docs/Makefile.am +++ b/tests/docs/Makefile.am @@ -93,6 +93,7 @@ EXTRA_DIST = \ bug-91.xml \ bug-92.xml \ bug-93.xml \ + bug-94.xml \ character.xml \ array.xml \ items.xml diff --git a/tests/docs/bug-94.xml b/tests/docs/bug-94.xml new file mode 100644 index 00000000..10935f77 --- /dev/null +++ b/tests/docs/bug-94.xml @@ -0,0 +1,9 @@ +<source> + +<number>1</number> +<number>3</number> +<number>4</number> +<number>17</number> +<number>8</number> + +</source> diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index 0903b3a4..705cc313 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -97,6 +97,7 @@ EXTRA_DIST = \ bug-92.out bug-92.xsl \ bug-93.out bug-93.xsl \ bug-93-inc.out bug-93-inc.xsl \ + bug-94.out bug-94.xsl \ character.out character.xsl \ character2.out character2.xsl \ itemschoose.out itemschoose.xsl \ diff --git a/tests/general/bug-94.out b/tests/general/bug-94.out new file mode 100644 index 00000000..a484d1ea --- /dev/null +++ b/tests/general/bug-94.out @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<TABLE><TR><TH>1 (even)</TH></TR><TR><TH>3 (even)</TH></TR><TR><TH>4 (even)</TH></TR><TR><TH>17 (even)</TH></TR><TR><TH>8 (even)</TH></TR></TABLE> 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> |