dmarston 2002/06/13 12:58:04 Added: test/tests/conf/match match32.xsl match30.xsl match31.xml match31.xsl match32.xml match30.xml Log: Test associated with Bugzilla #9834. Revision Changes Path 1.1 xml-xalan/test/tests/conf/match/match32.xsl Index: match32.xsl =================================================================== <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: match32 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 5.2 --> <!-- Purpose: Use multiple levels of child axis in match patterns. Spell out 'child::' sometimes. --> <!-- Creator: Henry Zongaro --> <xsl:output method="xml" encoding="UTF-8" indent="no"/> <xsl:template match="/"> <out> <xsl:apply-templates/><!-- rely on some built-ins --> </out> </xsl:template> <xsl:template match="doc/l1/v2"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc/l1/v2; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc/l1//v3"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc/l1//v3; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc//l2/w3"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc//l2/w3; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc//l2//v4"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc//l2//v4; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc/child::l1/child::x2"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc/child::l1/child::x2; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc/child::l1//child::x3"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc/child::l1//child::x3; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc//child::l2/child::y3"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc//child::l2/child::y3; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc//child::l2//child::x4"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc//child::l2//child::x4; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match='text()'/><!-- squelch direct replay of text --> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/match/match30.xsl Index: match30.xsl =================================================================== <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: match30 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 5.2 --> <!-- Purpose: Use multiple levels of child axis in match patterns. Intermix 'child::' and default, but only with child:: in the middle. --> <!-- Creator: Henry Zongaro --> <xsl:output method="xml" encoding="UTF-8" indent="no"/> <xsl:template match="/"> <out> <xsl:apply-templates/><!-- rely on some built-ins --> </out> </xsl:template> <xsl:template match="doc/l1/v2"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc/l1/v2; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc/l1//v3"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc/l1//v3; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc//l2/w3"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc//l2/w3; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc//l2//v4"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc//l2//v4; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc/child::l1/x2"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc/child::l1/x2; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc/child::l1//x3"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc/child::l1//x3; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc//child::l2/y3"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc//child::l2/y3; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc//child::l2//x4"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc//child::l2//x4; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match='text()'/><!-- squelch direct replay of text --> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/match/match31.xml Index: match31.xml =================================================================== <?xml version="1.0"?> <doc> <l1> <v2>doc-l1-v2</v2> <x2>doc-l1-x2</x2> <l2> <v3>doc-l1-l2-v3</v3> <w3>doc-l1-l2-w3</w3> <x3>doc-l1-l2-x3</x3> <y3>doc-l1-l2-y3</y3> <l3> <v4>doc-l1-l2-l3-v4</v4> <x4>doc-l1-l2-l3-x4</x4> </l3> </l2> </l1> </doc> 1.1 xml-xalan/test/tests/conf/match/match31.xsl Index: match31.xsl =================================================================== <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- FileName: match31 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 5.2 --> <!-- Purpose: Use multiple levels of child axis in match patterns. Intermix 'child::' and default, but only with child:: on the tail. --> <!-- Creator: Henry Zongaro --> <xsl:output method="xml" encoding="UTF-8" indent="no"/> <xsl:template match="/"> <out> <xsl:apply-templates/><!-- rely on some built-ins --> </out> </xsl:template> <xsl:template match="doc/l1/v2"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc/l1/v2; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc/l1//v3"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc/l1//v3; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc//l2/w3"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc//l2/w3; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc//l2//v4"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc//l2//v4; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc/l1/child::x2"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc/l1/child::x2; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc/l1//child::x3"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc/l1//child::x3; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc//l2/child::y3"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc//l2/child::y3; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match="doc//l2//child::x4"> <xsl:text> </xsl:text> <match> <xsl:text>Rule doc//l2//child::x4; value of matched node: </xsl:text> <xsl:value-of select='.'/> </match> </xsl:template> <xsl:template match='text()'/><!-- squelch direct replay of text --> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/match/match32.xml Index: match32.xml =================================================================== <?xml version="1.0"?> <doc> <l1> <v2>doc-l1-v2</v2> <x2>doc-l1-x2</x2> <l2> <v3>doc-l1-l2-v3</v3> <w3>doc-l1-l2-w3</w3> <x3>doc-l1-l2-x3</x3> <y3>doc-l1-l2-y3</y3> <l3> <v4>doc-l1-l2-l3-v4</v4> <x4>doc-l1-l2-l3-x4</x4> </l3> </l2> </l1> </doc> 1.1 xml-xalan/test/tests/conf/match/match30.xml Index: match30.xml =================================================================== <?xml version="1.0"?> <doc> <l1> <v2>doc-l1-v2</v2> <x2>doc-l1-x2</x2> <l2> <v3>doc-l1-l2-v3</v3> <w3>doc-l1-l2-w3</w3> <x3>doc-l1-l2-x3</x3> <y3>doc-l1-l2-y3</y3> <l3> <v4>doc-l1-l2-l3-v4</v4> <x4>doc-l1-l2-l3-x4</x4> </l3> </l2> </l1> </doc>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]