mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-11-02 13:33:20 +03:00
added a home brewed test for path computation elmininating duplicate in
* tests/docs/Makefile.am tests/docs/bug-76.xml tests/general/Makefile.am tests/general/bug-76.*: added a home brewed test for path computation elmininating duplicate in result sets. Daniel
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
Wed Mar 13 13:41:19 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* tests/docs/Makefile.am tests/docs/bug-76.xml
|
||||
tests/general/Makefile.am tests/general/bug-76.*: added a
|
||||
home brewed test for path computation elmininating duplicate
|
||||
in result sets.
|
||||
|
||||
Sat Mar 9 11:53:39 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* doc/Makefile.am: fixed a build problem in some environements
|
||||
|
||||
@@ -76,6 +76,7 @@ EXTRA_DIST = \
|
||||
bug-73.xml \
|
||||
bug-74.xml \
|
||||
bug-75.xml \
|
||||
bug-76.xml \
|
||||
character.xml \
|
||||
array.xml \
|
||||
items.xml
|
||||
|
||||
4
tests/docs/bug-76.xml
Normal file
4
tests/docs/bug-76.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<doc>
|
||||
<child1/>
|
||||
<child2/>
|
||||
</doc>
|
||||
@@ -79,6 +79,7 @@ EXTRA_DIST = \
|
||||
bug-73.out bug-73.xsl \
|
||||
bug-74.out bug-74.xsl \
|
||||
bug-75.out bug-75.xsl \
|
||||
bug-76.out bug-76.xsl \
|
||||
character.out character.xsl \
|
||||
character2.out character2.xsl \
|
||||
itemschoose.out itemschoose.xsl \
|
||||
|
||||
4
tests/general/bug-76.out
Normal file
4
tests/general/bug-76.out
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
Count1 :1
|
||||
Count2 :1
|
||||
|
||||
16
tests/general/bug-76.xsl
Normal file
16
tests/general/bug-76.xsl
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:template match="/">
|
||||
<xsl:variable name="first" select="/doc/*[1]"/>
|
||||
<xsl:variable name="last" select="/doc/*[last()]"/>
|
||||
<xsl:text>Count1 :</xsl:text>
|
||||
<xsl:value-of select="count($first/ancestor::* | $last/ancestor::*)"/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:variable name="both" select="/doc/child2 | /doc/child1"/>
|
||||
<xsl:text>Count2 :</xsl:text>
|
||||
<xsl:value-of select="count($both/ancestor::*)"/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
Reference in New Issue
Block a user