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 2001/09/04 20:04:09 UTC
cvs commit: xml-xalan/test/tests/conf/position position92.xsl position92.xml
dmarston 01/09/04 11:04:09
Added: test/tests/conf/position position92.xsl position92.xml
Log:
New cases from John Howard.
Revision Changes Path
1.1 xml-xalan/test/tests/conf/position/position92.xsl
Index: position92.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- FileName: position92 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 3.3 -->
<!-- Creator: John Howard -->
<!-- Purpose: Test retrieving correct values from node-set variables by positional predicate. -->
<xsl:output method="xml"/>
<xsl:template match="/">
<xsl:variable name="x1">
<xsl:variable name="node" select="/foo/*/test/text()"/>
<xsl:value-of select="$node[1]"/>
</xsl:variable>
<xsl:variable name="x6">
<xsl:variable name="node" select="/foo/*/test/text()"/>
<xsl:for-each select="$node[6]">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="xL">
<xsl:variable name="node" select="/foo/*/test/text()"/>
<xsl:for-each select="$node[last()]">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:variable>
<out>
<x1><xsl:value-of select="$x1"/></x1><xsl:text> </xsl:text>
<x6><xsl:value-of select="$x6"/></x6><xsl:text> </xsl:text>
<xL><xsl:value-of select="$xL"/></xL>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/position/position92.xml
Index: position92.xml
===================================================================
<?xml version="1.0"?>
<foo>
<bar>
<test>1</test>
<test>3</test>
<test>5</test>
<test>7</test>
<test>9</test>
</bar>
<baz>
<test>2</test>
<test>4</test>
<test>6</test>
<test>8</test>
<test>10</test>
</baz>
</foo>
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org