dmarston 2002/06/07 15:18:09 Added: test/tests/conf/node node21.xsl node20.xsl node21.xml node20.xml Log: Tests inspired by Bugzilla#9575 Revision Changes Path 1.1 xml-xalan/test/tests/conf/node/node21.xsl Index: node21.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: node21 --> <!-- Document: http://www.w3.org/TR/xpath --> <!-- DocVersion: 19991116 --> <!-- Section: 2.3 --> <!-- Creator: David Marston --> <!-- Purpose: Test for 'ancestor::node()' in select. --> <xsl:output method="xml" indent="no" encoding="UTF-8"/> <xsl:template match="/"> <out> <xsl:for-each select="//center"> <xsl:apply-templates select="ancestor::node()" mode="upward"/> </xsl:for-each> </out> </xsl:template> <xsl:template match="node()" mode="upward"> <xsl:value-of select="name(.)"/><xsl:text>, </xsl:text> </xsl:template> <xsl:template match="/" mode="upward"> <xsl:text>Root Node; </xsl:text> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/node/node20.xsl Index: node20.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: node20 --> <!-- Document: http://www.w3.org/TR/xpath --> <!-- DocVersion: 19991116 --> <!-- Section: 2.3 --> <!-- Creator: David Marston --> <!-- Purpose: Test for 'parent::node()' in select. --> <xsl:output method="xml" indent="no" encoding="UTF-8"/> <xsl:template match="/"> <out> <xsl:for-each select="//center"> <xsl:apply-templates select="parent::node()" mode="upward"/> </xsl:for-each> </out> </xsl:template> <xsl:template match="node()" mode="upward"> <xsl:value-of select="name(.)"/><xsl:text>, </xsl:text> <xsl:apply-templates select="parent::node()" mode="upward"/> </xsl:template> <xsl:template match="/" mode="upward"> <xsl:text>Root Node</xsl:text> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/node/node21.xml Index: node21.xml =================================================================== <?xml version="1.0"?> <far-north> Level-1 <north> <near-north> <far-west/> <west/> <near-west/> <center> <south/> </center> </near-north> </north> </far-north> 1.1 xml-xalan/test/tests/conf/node/node20.xml Index: node20.xml =================================================================== <?xml version="1.0"?> <far-north> Level-1 <north> <near-north> <far-west/> <west/> <near-west/> <center> <south/> </center> </near-north> </north> </far-north>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]