You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by jk...@apache.org on 2002/05/21 17:42:42 UTC

cvs commit: xml-xalan/test/tests/conf/variable variable73.xml variable73.xsl variable74.xml variable74.xsl

jkesselm    02/05/21 08:42:42

  Added:       test/tests/conf/variable variable73.xml variable73.xsl
                        variable74.xml variable74.xsl
  Log:
  New tests for navigation within RTFs.
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/variable/variable73.xml
  
  Index: variable73.xml
  ===================================================================
  <?xml version="1.0"?> 
  <far-north>
  	<north>
  		<near-north>
  			<far-west/>
  			<west/>
  			<near-west/>
  			<center>Source doc, just a distraction
  				<near-south>
  					<south>
  						<far-south/>
  					</south>
  				</near-south>
  			</center>
  				<near-east/>
  				<east/>
  				<far-east/>
  		</near-north>
  	</north>
  </far-north>
  
  
  
  1.1                  xml-xalan/test/tests/conf/variable/variable73.xsl
  
  Index: variable73.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
                  xmlns:ex="http://xml.apache.org/xalan"
                  extension-element-prefixes="ex">
  
    <!-- FileName: variable73 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.4 -->
    <!-- Creator: Joe Kesselman -->
    <!-- Purpose: Ensure that traversal of global RTF gets the right one.
  	Similar to Variable71
  	... Theoretically, we should repeat the whole Axes suite for
  	variables.
  	-->
  
  <xsl:output method="xml" indent="no" encoding="UTF-8"/>
  
  <xsl:variable name="top1">
  <t1-far-north>
  	<t1-north>
  		<t1-near-north>
  			<t1-far-west/>
  			<t1-west/>
  			<t1-near-west/>
  			<center>Wrong variable, can you dig it?
  				<t1-near-south>
  					<t1-south>
  						<t1-far-south/>
  					</t1-south>
  				</t1-near-south>
  			</center>
  				<t1-near-east/>
  				<t1-east/>
  				<t1-far-east/>
  		</t1-near-north>
  	</t1-north>
  </t1-far-north>
  </xsl:variable>
  
  <xsl:variable name="top2">
  <t2-far-north>
  	<t2-north>
  		<t2-near-north>
  			<t2-far-west/>
  			<t2-west/>
  			<t2-near-west/>
  			<center>Dig we must!
  				<t2-near-south>
  					<t2-south>
  						<t2-far-south/>
  					</t2-south>
  				</t2-near-south>
  			</center>
  				<t2-near-east/>
  				<t2-east/>
  				<t2-far-east/>
  		</t2-near-north>
  	</t2-north>
  </t2-far-north>
  </xsl:variable>
  
  <xsl:template match="/">
    <out>
      <!-- First, force evaluation of each variable -->
      <junk>
        <xsl:text>$top1 summary: </xsl:text>
        <xsl:value-of select="$top1"/>
        <xsl:text>
  </xsl:text>
  
        <xsl:text>$top2 summary: </xsl:text>
        <xsl:value-of select="$top2"/>
      </junk>
      <xsl:text>
  
  </xsl:text>
  
      <xsl:text>The center nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/child::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/child::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/descendant::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/descendant::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/parent::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/parent::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/ancestor::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/ancestor::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/following-sibling::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/following-sibling::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/preceding-sibling::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/preceding-sibling::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/following::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/following::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/preceding::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/preceding::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/attribute::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/attribute::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/namespace::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/namespace::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/self::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/self::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/descendant-or-self::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/descendant-or-self::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/ancestor-or-self::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/ancestor-or-self::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  
  </xsl:text>
  
      <xsl:text>The center/child::t2-near-south nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/child::t2-near-south">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/descendant::t2-south nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/descendant::t2-south">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/parent::t2-near-north nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/parent::t2-near-north">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/ancestor::t2-north nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/ancestor::t2-north">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/following-sibling::t2-east nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/following-sibling::t2-east">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/preceding-sibling::t2-west nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/preceding-sibling::t2-west">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/following::t2-east nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/following::t2-east">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/preceding::t2-west nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/preceding::t2-west">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/self::center nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/self::center">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/descendant-or-self::t2-south nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/descendant-or-self::t2-south">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/ancestor-or-self::t2-north nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/ancestor-or-self::t2-north">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  
  </xsl:text>
  
  	<xsl:apply-templates select="ex:nodeset($top2)//t2-north"/>
  
    </out>
  </xsl:template>
  
  <xsl:template match="t2-north">
    <out>
    <!-- DS meands the location path is optimizable as a single descendant iterator. -->
  DS   1. AC: <xsl:value-of select="name(/descendant-or-self::t2-north)"/>
  DS   2. AD: <xsl:value-of select="name(/descendant::t2-near-north)"/>
  DS   3. BC: <xsl:value-of select="name(self::node()/descendant-or-self::t2-north)"/>
  DS   4. BD: <xsl:value-of select="name(self::node()/descendant::t2-near-north)"/>
  NDS  5. CC: <xsl:value-of select="name(descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
  NDS  6. CD: <xsl:value-of select="name(descendant-or-self::t2-north/descendant::t2-near-north)"/>
  NDS  7. CE: <xsl:value-of select="name(descendant-or-self::t2-north/child::t2-near-north)"/>
  NDS  8. DC: <xsl:value-of select="name(descendant::t2-near-north/descendant-or-self::t2-near-north)"/>
  NDS  9. DD: <xsl:value-of select="name(descendant::t2-near-north/descendant::t2-far-west)"/>
  
  NDS 10. ACC: <xsl:value-of select="name(/descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
  NDS 11. ACE: <xsl:value-of select="name(/descendant-or-self::t2-north/child::t2-near-north)"/>
  NDS 12. ADC: <xsl:value-of select="name(/descendant::t2-near-north/descendant-or-self::t2-near-north)"/>
  NDS 13. BCC: <xsl:value-of select="name(self::node()/descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
  NDS 14. BCE: <xsl:value-of select="name(self::node()/descendant-or-self::t2-north/child::t2-near-north)"/>
  NDS 15. BDC: <xsl:value-of select="name(self::node()/descendant::t2-near-north/descendant-or-self::t2-far-west)"/>
  NDS 16. BDE: <xsl:value-of select="name(self::node()/descendant::t2-near-north/child::t2-far-west)"/>
  NDS 17. CCC: <xsl:value-of select="name(descendant-or-self::t2-north/descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
  NDS 18. CCE: <xsl:value-of select="name(descendant-or-self::t2-north/descendant-or-self::t2-north/child::t2-near-north)"/>
  NDS 19. CDC: <xsl:value-of select="name(descendant-or-self::t2-north/descendant::t2-near-north/descendant-or-self::t2-near-north)"/>
  NDS 20. CDE: <xsl:value-of select="name(descendant-or-self::t2-north/descendant::t2-near-north/child::t2-far-west)"/>
  NDS 21. CEC: <xsl:value-of select="name(descendant-or-self::t2-north/child::t2-near-north/descendant-or-self::t2-near-north)"/>
  NDS 22. CEE: <xsl:value-of select="name(descendant-or-self::t2-north/child::t2-near-north/child::t2-far-west)"/>
  NDS 23. DCC: <xsl:value-of select="name(descendant::t2-near-north/descendant-or-self::t2-near-north/descendant-or-self::t2-near-north)"/>
  NDS 24. DCE: <xsl:value-of select="name(descendant::t2-near-north/descendant-or-self::t2-near-north/child::t2-far-west)"/>
  NDS 25. DDC: <xsl:value-of select="name(descendant::t2-near-north/descendant::t2-far-west/descendant-or-self::t2-far-west)"/>
  
  DS  26. CC: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::t2-north)"/>
  DS  27. CD: <xsl:value-of select="name(descendant-or-self::node()/descendant::t2-near-north)"/>
  DS  28. CE: <xsl:value-of select="name(descendant-or-self::node()/child::t2-near-north)"/>
  DS  29. DC: <xsl:value-of select="name(descendant::node()/descendant-or-self::t2-near-north)"/>
  DS  30. DD: <xsl:value-of select="name(descendant::node()/descendant::t2-far-west)"/>
  
  DS  31. ACC: <xsl:value-of select="name(/descendant-or-self::node()/descendant-or-self::t2-north)"/>
  DS  32. ACE: <xsl:value-of select="name(/descendant-or-self::node()/child::t2-near-north)"/>
  DS  33. ADC: <xsl:value-of select="name(/descendant::node()/descendant-or-self::t2-near-north)"/>
  DS  34. BCC: <xsl:value-of select="name(self::node()/descendant-or-self::node()/descendant-or-self::t2-north)"/>
  DS  35. BCE: <xsl:value-of select="name(self::node()/descendant-or-self::node()/child::t2-near-north)"/>
  DS  36. BDC: <xsl:value-of select="name(self::node()/descendant::node()/descendant-or-self::t2-far-west)"/>
  DS  37. BDE: <xsl:value-of select="name(self::node()/descendant::node()/child::t2-far-west)"/>
  DS  38. CCC: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::node()/descendant-or-self::t2-north)"/>
  DS  39. CCE: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::node()/child::t2-near-north)"/>
  DS  40. CDC: <xsl:value-of select="name(descendant-or-self::node()/descendant::node()/descendant-or-self::t2-near-north)"/>
  DS  41. CDE: <xsl:value-of select="name(descendant-or-self::node()/descendant::node()/child::t2-far-west)"/>
  DS  42. CEC: <xsl:value-of select="name(descendant-or-self::node()/child::node()/descendant-or-self::t2-near-north)"/>
  DS  43. CEE: <xsl:value-of select="name(descendant-or-self::node()/child::node()/child::t2-far-west)"/>
  DS  44. DCC: <xsl:value-of select="name(descendant::node()/descendant-or-self::node()/descendant-or-self::t2-near-north)"/>
  DS  45. DCE: <xsl:value-of select="name(descendant::node()/descendant-or-self::node()/child::t2-far-west)"/>
  DS  46. DDC: <xsl:value-of select="name(descendant::node()/descendant::node()/descendant-or-self::t2-far-west)"/>
  
    </out>
  </xsl:template>
  <xsl:template match="north">
    <out>
    <!-- DS meands the location path is optimizable as a single descendant iterator. -->
  DS   1. AC: <xsl:value-of select="name(/descendant-or-self::t2-north)"/>
  DS   2. AD: <xsl:value-of select="name(/descendant::t2-near-north)"/>
  DS   3. BC: <xsl:value-of select="name(self::node()/descendant-or-self::t2-north)"/>
  DS   4. BD: <xsl:value-of select="name(self::node()/descendant::t2-near-north)"/>
  NDS  5. CC: <xsl:value-of select="name(descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
  NDS  6. CD: <xsl:value-of select="name(descendant-or-self::t2-north/descendant::t2-near-north)"/>
  NDS  7. CE: <xsl:value-of select="name(descendant-or-self::t2-north/child::t2-near-north)"/>
  NDS  8. DC: <xsl:value-of select="name(descendant::t2-near-north/descendant-or-self::t2-near-north)"/>
  NDS  9. DD: <xsl:value-of select="name(descendant::t2-near-north/descendant::t2-far-west)"/>
  
  NDS 10. ACC: <xsl:value-of select="name(/descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
  NDS 11. ACE: <xsl:value-of select="name(/descendant-or-self::t2-north/child::t2-near-north)"/>
  NDS 12. ADC: <xsl:value-of select="name(/descendant::t2-near-north/descendant-or-self::t2-near-north)"/>
  NDS 13. BCC: <xsl:value-of select="name(self::node()/descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
  NDS 14. BCE: <xsl:value-of select="name(self::node()/descendant-or-self::t2-north/child::t2-near-north)"/>
  NDS 15. BDC: <xsl:value-of select="name(self::node()/descendant::t2-near-north/descendant-or-self::t2-far-west)"/>
  NDS 16. BDE: <xsl:value-of select="name(self::node()/descendant::t2-near-north/child::t2-far-west)"/>
  NDS 17. CCC: <xsl:value-of select="name(descendant-or-self::t2-north/descendant-or-self::t2-north/descendant-or-self::t2-north)"/>
  NDS 18. CCE: <xsl:value-of select="name(descendant-or-self::t2-north/descendant-or-self::t2-north/child::t2-near-north)"/>
  NDS 19. CDC: <xsl:value-of select="name(descendant-or-self::t2-north/descendant::t2-near-north/descendant-or-self::t2-near-north)"/>
  NDS 20. CDE: <xsl:value-of select="name(descendant-or-self::t2-north/descendant::t2-near-north/child::t2-far-west)"/>
  NDS 21. CEC: <xsl:value-of select="name(descendant-or-self::t2-north/child::t2-near-north/descendant-or-self::t2-near-north)"/>
  NDS 22. CEE: <xsl:value-of select="name(descendant-or-self::t2-north/child::t2-near-north/child::t2-far-west)"/>
  NDS 23. DCC: <xsl:value-of select="name(descendant::t2-near-north/descendant-or-self::t2-near-north/descendant-or-self::t2-near-north)"/>
  NDS 24. DCE: <xsl:value-of select="name(descendant::t2-near-north/descendant-or-self::t2-near-north/child::t2-far-west)"/>
  NDS 25. DDC: <xsl:value-of select="name(descendant::t2-near-north/descendant::t2-far-west/descendant-or-self::t2-far-west)"/>
  
  DS  26. CC: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::t2-north)"/>
  DS  27. CD: <xsl:value-of select="name(descendant-or-self::node()/descendant::t2-near-north)"/>
  DS  28. CE: <xsl:value-of select="name(descendant-or-self::node()/child::t2-near-north)"/>
  DS  29. DC: <xsl:value-of select="name(descendant::node()/descendant-or-self::t2-near-north)"/>
  DS  30. DD: <xsl:value-of select="name(descendant::node()/descendant::t2-far-west)"/>
  
  DS  31. ACC: <xsl:value-of select="name(/descendant-or-self::node()/descendant-or-self::t2-north)"/>
  DS  32. ACE: <xsl:value-of select="name(/descendant-or-self::node()/child::t2-near-north)"/>
  DS  33. ADC: <xsl:value-of select="name(/descendant::node()/descendant-or-self::t2-near-north)"/>
  DS  34. BCC: <xsl:value-of select="name(self::node()/descendant-or-self::node()/descendant-or-self::t2-north)"/>
  DS  35. BCE: <xsl:value-of select="name(self::node()/descendant-or-self::node()/child::t2-near-north)"/>
  DS  36. BDC: <xsl:value-of select="name(self::node()/descendant::node()/descendant-or-self::t2-far-west)"/>
  DS  37. BDE: <xsl:value-of select="name(self::node()/descendant::node()/child::t2-far-west)"/>
  DS  38. CCC: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::node()/descendant-or-self::t2-north)"/>
  DS  39. CCE: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-self::node()/child::t2-near-north)"/>
  DS  40. CDC: <xsl:value-of select="name(descendant-or-self::node()/descendant::node()/descendant-or-self::t2-near-north)"/>
  DS  41. CDE: <xsl:value-of select="name(descendant-or-self::node()/descendant::node()/child::t2-far-west)"/>
  DS  42. CEC: <xsl:value-of select="name(descendant-or-self::node()/child::node()/descendant-or-self::t2-near-north)"/>
  DS  43. CEE: <xsl:value-of select="name(descendant-or-self::node()/child::node()/child::t2-far-west)"/>
  DS  44. DCC: <xsl:value-of select="name(descendant::node()/descendant-or-self::node()/descendant-or-self::t2-near-north)"/>
  DS  45. DCE: <xsl:value-of select="name(descendant::node()/descendant-or-self::node()/child::t2-far-west)"/>
  DS  46. DDC: <xsl:value-of select="name(descendant::node()/descendant::node()/descendant-or-self::t2-far-west)"/>
  
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/variable/variable74.xml
  
  Index: variable74.xml
  ===================================================================
  <?xml version="1.0"?> 
  <far-north>
  	<north>
  		<near-north>
  			<far-west/>
  			<west/>
  			<near-west/>
  			<center>Source doc, just a distraction
  				<near-south>
  					<south>
  						<far-south/>
  					</south>
  				</near-south>
  			</center>
  				<near-east/>
  				<east/>
  				<far-east/>
  		</near-north>
  	</north>
  </far-north>
  
  
  
  1.1                  xml-xalan/test/tests/conf/variable/variable74.xsl
  
  Index: variable74.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
                  xmlns:ex="http://xml.apache.org/xalan"
                  extension-element-prefixes="ex">
  
    <!-- FileName: variable74 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.4 -->
    <!-- Creator: Joe Kesselman -->
    <!-- Purpose: Ensure that traversal of global RTF gets the right one.
  	Similar to Variable72
  	-->
  
  <xsl:output method="xml" indent="no" encoding="UTF-8"/>
  
  
  <xsl:template match="/">
  	<xsl:variable name="top1">
  	<t1-far-north>
  		<t1-north>
  			<t1-near-north>
  				<t1-far-west/>
  				<t1-west/>
  				<t1-near-west/>
  				<center>Wrong variable, can you dig it?
  					<t1-near-south>
  						<t1-south>
  							<t1-far-south/>
  						</t1-south>
  					</t1-near-south>
  				</center>
  					<t1-near-east/>
  					<t1-east/>
  					<t1-far-east/>
  			</t1-near-north>
  		</t1-north>
  	</t1-far-north>
  	</xsl:variable>
  
  	<xsl:variable name="top2">
  	<t2-far-north>
  		<t2-north>
  			<t2-near-north>
  				<t2-far-west/>
  				<t2-west/>
  				<t2-near-west/>
  				<center>Dig we must!
  					<t2-near-south>
  						<t2-south>
  							<t2-far-south/>
  						</t2-south>
  					</t2-near-south>
  				</center>
  					<t2-near-east/>
  					<t2-east/>
  					<t2-far-east/>
  			</t2-near-north>
  		</t2-north>
  	</t2-far-north>
  	</xsl:variable>
  
    <out>
      <!-- First, force evaluation of each variable -->
      <junk>
        <xsl:text>$top1 summary: </xsl:text>
        <xsl:value-of select="$top1"/>
        <xsl:text>
  </xsl:text>
  
        <xsl:text>$top2 summary: </xsl:text>
        <xsl:value-of select="$top2"/>
      </junk>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/child::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/child::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/descendant::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/descendant::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/parent::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/parent::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/ancestor::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/ancestor::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/following-sibling::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/following-sibling::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/preceding-sibling::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/preceding-sibling::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/following::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/following::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/preceding::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/preceding::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/attribute::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/attribute::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/namespace::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/namespace::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/self::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/self::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/descendant-or-self::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/descendant-or-self::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center/ancestor-or-self::* nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/ancestor-or-self::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org