dmarston 01/09/27 10:30:20 Added: test/tests/conf/position position93.xsl position93.xml Log: Adapt position08 with sorting. Squelches bug #1414. Revision Changes Path 1.1 xml-xalan/test/tests/conf/position/position93.xsl Index: position93.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: position93 --> <!-- Document: http://www.w3.org/TR/xpath --> <!-- DocVersion: 19991116 --> <!-- Section: 4.1 --> <!-- Creator: David Marston --> <!-- Purpose: Test of position() in match pattern. Nodes are sorted. --> <!-- Elaboration: The nodes are processed in the sorted order, but the position() in the match pattern always refers to the node as found in the source tree. --> <xsl:template match="doc"> <out><xsl:text> </xsl:text> <xsl:apply-templates select="a"> <xsl:sort select="@z" data-type="number"/> </xsl:apply-templates> </out> </xsl:template> <xsl:template match="a[position()=4]"> <a4><xsl:value-of select="."/></a4><xsl:text> </xsl:text> </xsl:template> <xsl:template match="a[position()=3]"> <a3><xsl:value-of select="."/></a3><xsl:text> </xsl:text> </xsl:template> <xsl:template match="a[position()=2]"> <a2><xsl:value-of select="."/></a2><xsl:text> </xsl:text> </xsl:template> <xsl:template match="a[position()=1]"> <a1><xsl:value-of select="."/></a1><xsl:text> </xsl:text> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/position/position93.xml Index: position93.xml =================================================================== <?xml version="1.0"?> <doc> <a z="3">1st</a> <a z="2">2nd</a> <a z="4">3rd</a> <a z="1">4th</a> </doc>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
