dmarston 01/07/27 11:06:05 Added: test/tests/conf/match match16.xsl match16.xml Log: Match-pattern version of the a//b[n] tests. Revision Changes Path 1.1 xml-xalan/test/tests/conf/match/match16.xsl Index: match16.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- FileName: match16 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 5.2 --> <!-- Creator: David Marston --> <!-- Purpose: Test step//step[predicate], with positional predicate, to show that position numbering applies "relative to the child axis", not //. --> <xsl:output method="xml" encoding="utf-8"/> <xsl:template match="/"> <out> <xsl:for-each select="*"> <xsl:apply-templates/> </xsl:for-each> </out> </xsl:template> <xsl:template match="chapter//footnote[1]"> <xsl:text> </xsl:text> <first> <xsl:value-of select="."/> </first> </xsl:template> <xsl:template match="chapter//footnote[position() != 1]"> <other/> </xsl:template> <xsl:template match="text()"/><!-- Suppress text matching --> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/match/match16.xml Index: match16.xml =================================================================== <?xml version="1.0"?> <chapter> <section> <footnote>hello</footnote> <footnote>ahoy</footnote> </section> <section> <footnote>goodbye</footnote> <footnote>sayonara</footnote> <footnote>adios</footnote> </section> <section> <footnote>aloha</footnote> <subsection> <footnote>shalom</footnote> <footnote>yo</footnote> </subsection> <footnote>ciao</footnote> </section> </chapter>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
