You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dm...@apache.org on 2002/11/26 21:07:13 UTC
cvs commit: xml-xalan/test/tests/conf/select select86.xsl select85.xsl select86.xml select85.xml
dmarston 2002/11/26 12:07:13
Added: test/tests/conf/select select86.xsl select85.xsl
select86.xml select85.xml
Log:
More coverage of current()
Revision Changes Path
1.1 xml-xalan/test/tests/conf/select/select86.xsl
Index: select86.xsl
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: select86 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 12.4 Miscellaneous Additional Functions -->
<!-- Purpose: Test that current() returns a node-set suitable for count(). -->
<!-- Creator: David Marston -->
<!-- Elaboration: There was a bug, masked by current()/sub-node -->
<xsl:output method="xml" indent="no" encoding="UTF-8"/>
<xsl:template match="doc">
<out>
<xsl:text> </xsl:text>
<xsl:apply-templates select="m"/>
<xsl:text> </xsl:text>
<xsl:for-each select="m">
<for1><xsl:value-of select="count(current())"/></for1>
<xsl:text> </xsl:text>
<for2><xsl:value-of select="following-sibling::*[count(current())]"/></for2>
</xsl:for-each>
<xsl:text> </xsl:text>
</out>
</xsl:template>
<xsl:template match="m">
<apply><xsl:value-of select="count(current())"/></apply>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/select/select85.xsl
Index: select85.xsl
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: select85 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 12.4 Miscellaneous Additional Functions -->
<!-- Purpose: Test current() by itself in a predicate. -->
<!-- Creator: Henry Zongaro -->
<xsl:output method="xml" indent="no" encoding="UTF-8"/>
<xsl:template match="doc">
<out>
<xsl:text> </xsl:text>
<xsl:apply-templates select="mark"/>
<xsl:text> </xsl:text>
</out>
</xsl:template>
<!-- Both of the following should select the same thing. -->
<xsl:template match="mark">
<in><xsl:value-of select="following-sibling::ch[current()]"/></in>
<xsl:text> </xsl:text>
<in><xsl:value-of select="(following-sibling::ch[current()])[1]"/></in>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/select/select86.xml
Index: select86.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<m/>
<n>ok</n>
</doc>
1.1 xml-xalan/test/tests/conf/select/select85.xml
Index: select85.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<mark/>
<ch>ch1</ch>
<ch>ch2</ch>
<ch>ch3</ch>
</doc>
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org