diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2003-03-07 14:30:57 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2003-03-07 14:30:57 +0000 |
commit | 501d615ec140538597078844ec3b0a579dde4dfb (patch) | |
tree | 2963fbb719a528e26afd0f0b9e0e0aa7791b3b90 /tests | |
parent | 9a9d10d1d4169e1607cbe0941a72dc31af85c303 (diff) | |
download | libxslt-501d615ec140538597078844ec3b0a579dde4dfb.tar.gz libxslt-501d615ec140538597078844ec3b0a579dde4dfb.tar.bz2 libxslt-501d615ec140538597078844ec3b0a579dde4dfb.zip |
added an example in the regression tests bug #107804 fixed in libxml2
* tests/docs/Makefile.am tests/docs/bug-108.xml
tests/general/Makefile.am tests/general/bug-108*: added an
example in the regression tests bug #107804 fixed in libxml2
Daniel
Diffstat (limited to 'tests')
-rw-r--r-- | tests/docs/Makefile.am | 1 | ||||
-rw-r--r-- | tests/docs/bug-108.xml | 4 | ||||
-rw-r--r-- | tests/general/Makefile.am | 1 | ||||
-rw-r--r-- | tests/general/bug-108.out | 25 | ||||
-rw-r--r-- | tests/general/bug-108.xsl | 21 |
5 files changed, 52 insertions, 0 deletions
diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am index 685b02e8..307c25eb 100644 --- a/tests/docs/Makefile.am +++ b/tests/docs/Makefile.am @@ -107,6 +107,7 @@ EXTRA_DIST = \ bug-105.xml \ bug-106.xml \ bug-107.xml \ + bug-108.xml \ character.xml \ array.xml \ items.xml diff --git a/tests/docs/bug-108.xml b/tests/docs/bug-108.xml new file mode 100644 index 00000000..9ec6ac20 --- /dev/null +++ b/tests/docs/bug-108.xml @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<a name="a"><b name="b"><c name="c"><d name="d"><e name="e"><f name="f"><g +name="g"><h name="h"> +</h></g></f></e></d></c></b></a> diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index aca105ab..ccd0538f 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -112,6 +112,7 @@ EXTRA_DIST = \ bug-105.out bug-105.xsl \ bug-106.out bug-106.xsl \ bug-107.out bug-107.xsl \ + bug-108.out bug-108.xsl \ character.out character.xsl \ character2.out character2.xsl \ itemschoose.out itemschoose.xsl \ diff --git a/tests/general/bug-108.out b/tests/general/bug-108.out new file mode 100644 index 00000000..b248b87c --- /dev/null +++ b/tests/general/bug-108.out @@ -0,0 +1,25 @@ + +selecting by element: /a + by attribute: /a + +selecting by element: /a/b + by attribute: /a/b + +selecting by element: /a/b/c + by attribute: /a/b/c + +selecting by element: /a/b/c/d + by attribute: /a/b/c/d + +selecting by element: /a/b/c/d/e + by attribute: /a/b/c/d/e + +selecting by element: /a/b/c/d/e/f + by attribute: /a/b/c/d/e/f + +selecting by element: /a/b/c/d/e/f/g + by attribute: /a/b/c/d/e/f/g + +selecting by element: /a/b/c/d/e/f/g/h + by attribute: /a/b/c/d/e/f/g/h + diff --git a/tests/general/bug-108.xsl b/tests/general/bug-108.xsl new file mode 100644 index 00000000..2ff741c7 --- /dev/null +++ b/tests/general/bug-108.xsl @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +version="1.0" > + + <xsl:output method="text"/> + <xsl:template match="*"> + <xsl:text>
selecting by element: </xsl:text> + <xsl:for-each select="ancestor-or-self::*"> + <xsl:text>/</xsl:text> + <xsl:value-of select="@name"/> + </xsl:for-each> + <xsl:text>
 by attribute: </xsl:text> + <xsl:for-each select="ancestor-or-self::*/@name"> + <xsl:text>/</xsl:text> + <xsl:value-of select="."/> + </xsl:for-each> + <xsl:text>
</xsl:text> + <xsl:apply-templates/> + </xsl:template> + +</xsl:stylesheet> |