xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmars...@apache.org
Subject cvs commit: xml-xalan/test/tests/extensions/library libraryNodeset02.xsl libraryNodeset02.xml libraryNodeset04.xml libraryNodeset04.xsl libraryNodeset05.xml libraryNodeset05.xsl libraryNodeset06.xml libraryNodeset06.xsl libraryNodeset07.xml libraryNodeset07.xsl libraryNodeset08.xml libraryNodeset08.xsl
Date Wed, 22 May 2002 20:15:45 GMT
dmarston    02/05/22 13:15:44

  Added:       test/tests/extensions/library libraryNodeset02.xsl
                        libraryNodeset02.xml libraryNodeset04.xml
                        libraryNodeset04.xsl libraryNodeset05.xml
                        libraryNodeset05.xsl libraryNodeset06.xml
                        libraryNodeset06.xsl libraryNodeset07.xml
                        libraryNodeset07.xsl libraryNodeset08.xml
                        libraryNodeset08.xsl
  Log:
  These tests are about RTFs, but they need to use the nodeset()
  extension function, so they go here.
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/extensions/library/libraryNodeset02.xsl
  
  Index: libraryNodeset02.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: libraryNodeset02 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.4 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Ensure that traversal of nodeset of local RTF gets the right one. -->
  
  <xsl:output method="xml" indent="no" encoding="UTF-8"/>
  
  <xsl:template match="doc">
    <!-- Define a couple variables -->
    <xsl:variable name="var1">
      <t0>var1-begin
        <t1>var1-first1</t1>
        <t2>var1-first2</t2>
        <t1>var1-second1</t1>
      </t0>
    </xsl:variable>
    <xsl:variable name="var2">
      <t0>var2-begin
        <t1>var2-first1</t1>
        <t2>var2-first2</t2>
        <t1>var2-second1</t1>
      </t0>
    </xsl:variable>
  
    <out>
      <!-- Now, force evaluation of each of the above variables -->
      <junk>
        <xsl:text>$var1 summary: </xsl:text>
        <xsl:value-of select="$var1"/>
        <xsl:text>
  </xsl:text>
        <xsl:text>$var2 summary: </xsl:text>
        <xsl:value-of select="$var2"/>
      </junk>
      <xsl:text>
  </xsl:text>
      <xsl:text>The preceding::t1 elements in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//t2/preceding::t1">
        <xsl:value-of select="."/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.3       +7 -16     xml-xalan/test/tests/extensions/library/libraryNodeset02.xml
  
  
  
  
  1.1                  xml-xalan/test/tests/extensions/library/libraryNodeset04.xml
  
  Index: libraryNodeset04.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <t0>begin
      <t1>content1</t1>
      <t2>content2</t2>
      <t1>extra1</t1>
    </t0>
  </doc>
  
  
  
  1.1                  xml-xalan/test/tests/extensions/library/libraryNodeset04.xsl
  
  Index: libraryNodeset04.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: libraryNodeset04 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.4 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Ensure that traversal of nodeset of global RTF gets the right one. -->
  
  <xsl:output method="xml" indent="no" encoding="UTF-8"/>
  
  <xsl:variable name="top1">
    <t0>top1-begin
      <t1>top1-first1</t1>
      <t2>top1-first2</t2>
      <t1>top1-second1</t1>
    </t0>
  </xsl:variable>
  
  <xsl:variable name="top2">
    <t0>top2-begin
      <t1>top2-first1</t1>
      <t2>top2-first2</t2>
      <t1>top2-second1</t1>
    </t0>
  </xsl:variable>
  
  <xsl:template match="doc">
    <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 preceding::t1 elements in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//t2/preceding::t1">
        <xsl:value-of select="."/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/extensions/library/libraryNodeset05.xml
  
  Index: libraryNodeset05.xml
  ===================================================================
  <?xml version="1.0"?> 
  <far-north>
    <north>
      <near-north>
        <far-west/>
        <west/>
        <near-west/>
        <center center-attr-1="cee" xmlns:n="http://example.com">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/extensions/library/libraryNodeset05.xsl
  
  Index: libraryNodeset05.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: libraryNodeset05 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.4 -->
    <!-- Creator: Joe Kesselman -->
    <!-- Purpose: Ensure that applying axes onto nodeset of global RTF gets the right one.
-->
  
  <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 center-attr-1="c1" xmlns:n="http://example.com">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 center-attr-1="c2" xmlns:n="http://example.com">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>W01: 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>W02: 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>W03: 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>W04: 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>W05: 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>W06: 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>W07: 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>W08: 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>W09: 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>W10: 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>W11: 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>W12: 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>W13: 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>
      <!-- Above was wildcard, now use name tests -->
      <xsl:text>N01: 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>N02: 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>N03: 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>N04: 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>N05: 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>N06: 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>N07: 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>N08: 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>N09: center/attribute::center-attr-1 nodes in $top2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($top2)//center/attribute::center-attr-1">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>N10: 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>N11: 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>N12: 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>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/extensions/library/libraryNodeset06.xml
  
  Index: libraryNodeset06.xml
  ===================================================================
  <?xml version="1.0"?> 
  <far-north>
    <north>
      <near-north>
        <far-west/>
        <west/>
        <near-west/>
        <center center-attr-1="cee" xmlns:n="http://example.com">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/extensions/library/libraryNodeset06.xsl
  
  Index: libraryNodeset06.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: libraryNodeset06 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.4 -->
    <!-- Creator: Joe Kesselman -->
    <!-- Purpose: Ensure that applying axes onto nodeset of local RTF gets the right one.
-->
  
  <xsl:output method="xml" indent="no" encoding="UTF-8"/>
  
  <xsl:template match="/">
    <xsl:variable name="var1">
      <t1-far-north>
        <t1-north>
          <t1-near-north>
            <t1-far-west/>
            <t1-west/>
            <t1-near-west/>
            <center center-attr-1="c1" xmlns:n="http://example.com">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="var2">
      <t2-far-north>
        <t2-north>
          <t2-near-north>
            <t2-far-west/>
            <t2-west/>
            <t2-near-west/>
            <center center-attr-1="c2" xmlns:n="http://example.com">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>
      <!-- Now, force evaluation of each of the above variables -->
      <junk>
        <xsl:text>$var1 summary: </xsl:text>
        <xsl:value-of select="$var1"/>
        <xsl:text>
  </xsl:text>
  
        <xsl:text>$var2 summary: </xsl:text>
        <xsl:value-of select="$var2"/>
      </junk>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>The center nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  
  </xsl:text>
  
      <xsl:text>W01: center/child::* nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/child::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>W02: center/descendant::* nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/descendant::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>W03: center/parent::* nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/parent::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>W04: center/ancestor::* nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/ancestor::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>W05: center/following-sibling::* nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/following-sibling::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>W06: center/preceding-sibling::* nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/preceding-sibling::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>W07: center/following::* nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/following::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>W08: center/preceding::* nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/preceding::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>W09: center/attribute::* nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/attribute::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>W10: center/namespace::* nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/namespace::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>W11: center/self::* nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/self::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>W12: center/descendant-or-self::* nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/descendant-or-self::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>W13: center/ancestor-or-self::* nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/ancestor-or-self::*">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  
  </xsl:text>
      <!-- Above was wildcard, now use name tests -->
      <xsl:text>N01: center/child::t2-near-south nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/child::t2-near-south">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>N02: center/descendant::t2-south nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/descendant::t2-south">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>N03: center/parent::t2-near-north nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/parent::t2-near-north">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>N04: center/ancestor::t2-north nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/ancestor::t2-north">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>N05: center/following-sibling::t2-east nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/following-sibling::t2-east">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>N06: center/preceding-sibling::t2-west nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/preceding-sibling::t2-west">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>N07: center/following::t2-east nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/following::t2-east">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>N08: center/preceding::t2-west nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/preceding::t2-west">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>N09: center/attribute::center-attr-1 nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/attribute::center-attr-1">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>N10: center/self::center nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/self::center">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>N11: center/descendant-or-self::t2-south nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/descendant-or-self::t2-south">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
  
      <xsl:text>N12: center/ancestor-or-self::t2-north nodes in $var2 are </xsl:text>
      <xsl:for-each select="ex:nodeset($var2)//center/ancestor-or-self::t2-north">
        <xsl:value-of select="name(.)"/>
        <xsl:text>,</xsl:text>
      </xsl:for-each>
      <xsl:text>
  </xsl:text>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/extensions/library/libraryNodeset07.xml
  
  Index: libraryNodeset07.xml
  ===================================================================
  <?xml version="1.0"?> 
  <far-north>
    <north>
      <near-north>
        <far-west/>
        <west/>
        <near-west/>
        <center center-attr-1="cee" xmlns:n="http://example.com">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/extensions/library/libraryNodeset07.xsl
  
  Index: libraryNodeset07.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: libraryNodeset07 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.4 -->
    <!-- Creator: Joe Kesselman -->
    <!-- Purpose: Try paths from nodeset of global RTF; ensure we get the right one. -->
    <!-- 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 center-attr-1="c1" xmlns:n="http://example.com">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 center-attr-1="c2" xmlns:n="http://example.com">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>
  
      <!-- Now, traverse some axes -->
      <xsl:apply-templates select="ex:nodeset($top2)//t2-north"/>
    </out>
  </xsl:template>
  
  <xsl:template match="t2-north">
    <!-- DS means 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)"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/extensions/library/libraryNodeset08.xml
  
  Index: libraryNodeset08.xml
  ===================================================================
  <?xml version="1.0"?> 
  <far-north>
    <north>
      <near-north>
        <far-west/>
        <west/>
        <near-west/>
        <center center-attr-1="cee" xmlns:n="http://example.com">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/extensions/library/libraryNodeset08.xsl
  
  Index: libraryNodeset08.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: libraryNodeset08 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.4 -->
    <!-- Creator: Joe Kesselman -->
    <!-- Purpose: Try paths from nodeset of local RTF; ensure we get the right one. -->
  
  <xsl:output method="xml" indent="no" encoding="UTF-8"/>
  
  <xsl:template match="/">
    <xsl:variable name="var1">
      <t1-far-north>
        <t1-north>
          <t1-near-north>
            <t1-far-west/>
            <t1-west/>
            <t1-near-west/>
            <center center-attr-1="c1" xmlns:n="http://example.com">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="var2">
      <t2-far-north>
        <t2-north>
          <t2-near-north>
            <t2-far-west/>
            <t2-west/>
            <t2-near-west/>
            <center center-attr-1="c2" xmlns:n="http://example.com">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>
      <!-- Now, force evaluation of each of the above variables -->
      <junk>
        <xsl:text>$var1 summary: </xsl:text>
        <xsl:value-of select="$var1"/>
        <xsl:text>
  </xsl:text>
        <xsl:text>$var2 summary: </xsl:text>
        <xsl:value-of select="$var2"/>
      </junk>
  
      <!-- Now, traverse some axes -->
      <xsl:apply-templates select="ex:nodeset($var2)//t2-north"/>
    </out>
  </xsl:template>
  
  <xsl:template match="t2-north">
    <!-- DS means 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)"/>
  </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


Mime
View raw message