dmarston    00/12/17 13:34:48

  Added:       test/tests/conf/select select72.xsl select01.xsl
                        select02.xml select02.xsl select03.xml select03.xsl
                        select04.xml select04.xsl select05.xml select05.xsl
                        select06.xml select06.xsl select07.xml select07.xsl
                        select08.xml select08.xsl select09.xml select09.xsl
                        select10.xml select10.xsl select11.xml select11.xsl
                        select12.xml select12.xsl select13.xml select13.xsl
                        select15.xml select15.xsl select16.xml select16.xsl
                        select17.xml select17.xsl select18.xml select18.xsl
                        select19.xml select19.xsl select20.xml select20.xsl
                        select21.xml select21.xsl select22.xml select22.xsl
                        select23.xml select23.xsl select24.xml select24.xsl
                        select25.xml select25.xsl select26.xml select26.xsl
                        select27.xml select27.xsl select28.xml select28.xsl
                        select29.xml select29.xsl select30.xml select30.xsl
                        select31.xml select31.xsl select32.xml select32.xsl
                        select33.xml select33.xsl select34.xml select34.xsl
                        select35.xml select35.xsl select36.xml select36.xsl
                        select37.xml select37.xsl select38.xml select38.xsl
                        select39.xml select39.xsl select40.xml select40.xsl
                        select67.xml select67.xsl select68.xml select68.xsl
                        select69.xml select69.xsl select70.xml select70.xsl
                        select71.xml select71.xsl select72.xml select01.xml
  Log:
  Copy of tests in Lotus/IBM repository
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/select/select72.xsl
  
  Index: select72.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select72 -->
    <!-- Document: http://www.w3.org/TR/Xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.3 Node Sets -->
    <!-- Purpose: NodeSet union using two copies of same node, and variables -->
    <!-- Creator: David Marston -->
    <!-- This could be used to establish that the variable is of the node-set 
type,
       as opposed to string or one-node RTF, where the count would go up. -->
  
  <xsl:template match="/">
    <out>
      <xsl:variable name = "var1" select = "doc/sub1/child1" />
      <xsl:text>
  Count of node-set: </xsl:text>
      <xsl:value-of select = "count($var1)"/>
      <xsl:variable name = "var2" select = "$var1|$var1" />
      <xsl:text>
  Count of union: </xsl:text>
      <xsl:value-of select = "count($var2)"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select01.xsl
  
  Index: select01.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select01 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 2 -->
    <!-- Creator: Paul Dick -->
    <!-- Purpose: Test for absolute path selection.-->
  
  <xsl:template match="/">
    <out>
      <xsl:for-each select="doc/c/d/e">
        <xsl:value-of select="/doc/a/b/@attr"/>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select02.xml
  
  Index: select02.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <foo>a</foo>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select02.xsl
  
  Index: select02.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select02 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.4 -->
    <!-- Creator: Paul Dick -->
    <!-- Purpose: Test of current() function - just select it. -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="current()"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select03.xml
  
  Index: select03.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <foo name="x">
      <item type="z">a</item>
      <item type="c">b</item>
      <item type="x">c</item>
    </foo>
    <foo name="y">
      <item type="y">d</item>
      <item type="h">e</item>
      <item type="k">f</item>
    </foo>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select03.xsl
  
  Index: select03.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select03 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 2 -->
    <!-- Creator: Paul Dick -->
    <!-- Purpose: Test for select in for-each and current(). -->
  
  <xsl:template match="doc">
    <out>
      <xsl:for-each select="foo">
        <xsl:copy-of select="//[EMAIL PROTECTED]()/@name]"/><xsl:text> 
</xsl:text>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select04.xml
  
  Index: select04.xml
  ===================================================================
  <?xml version="1.0"?>
  <!-- to test xsl:process and xsl:for-each -->
  <doc>
    <do do="-do-">do</do>
    <re>re</re>
    <mi mi1="-mi1-" mi2="mi2">mi</mi>
    <fa fa="-fa-">fa<so so="-so-">so<la>la<ti>ti</ti>do</la></so></fa>
    <Gsharp so="so+">G#</Gsharp>
    <Aflat><natural><la>A</la></natural>Ab</Aflat>
    <Bflat>Bb</Bflat>
    <Csharp><natural>C</natural>C#<doublesharp>D</doublesharp></Csharp>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select04.xsl
  
  Index: select04.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select04 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 2 -->
    <!-- Purpose: Test of unions, returned in document order. -->
  
  <xsl:template match="/">
    <out>
      <xsl:apply-templates/>
    </out>
  </xsl:template>
  
  <xsl:template match="doc">
    This should come out fasolatido:
    <xsl:apply-templates select="fa"/>
    This should come out doremifasolatido:
    <xsl:apply-templates select="mi | do | fa | re"/>
    This should come out do-do-remi-mi1-mi2fasolatido-fa--so-:
    <xsl:apply-templates select="[EMAIL PROTECTED]'mi2'] | do | fa/so/@so | fa 
| mi/@* | re | fa/@fa | do/@do"/>
    This should come out solatidoG#:
    <xsl:apply-templates select=".//[EMAIL PROTECTED]"/>
    This should come out relatidoABb:
    <xsl:apply-templates select="*//la | //Bflat | re"/>
    This should come out domitiACD:
    <xsl:apply-templates select="fa/../mi | Aflat/natural/la | Csharp//* | 
/doc/do | *//ti"/>
  </xsl:template>
  
  <xsl:template match="@*">
    <xsl:value-of select="."/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select05.xml
  
  Index: select05.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <document-element>
    <inside>
      <way-inside/>
    </inside>
  </document-element>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select05.xsl
  
  Index: select05.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select05 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 2 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for selecting parent nodes. -->
  
  <xsl:template match="/">
    <out>At the root, should say the name is ():<xsl:apply-templates/></out>
  </xsl:template>
  
  <xsl:template match="way-inside">We are way inside.
    <xsl:apply-templates select=".." mode="parent"/>
  </xsl:template>
  
  <xsl:template match="* | /" mode="parent">
    name of parent is (<xsl:value-of select="name(.)"/>)
    <xsl:apply-templates select=".." mode="parent"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select06.xml
  
  Index: select06.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <title>Test for iterating</title>
    <a>
      <title>A1</title>
      <b>
        <title>A1B1</title>
      </b>
      <b>
        <title>A1B2</title>
        <c>
          <title>A1B2C1</title>
        </c>
        <c>
          <title>A1B2C2</title>
        </c>
        <c>
          <title>A1B2C3</title>
        </c>
      </b>
      <b>
        <title>A1B3</title>
        <c>
          <title>A1B3C4</title>
          <d>
            <title>A1B3C4D1</title>
          </d>
           <d>
            <title>A1B3C4D2</title>
          </d>
       </c>
      </b>
    </a>
    <a>
      <title>A2</title>
      <b>
        <title>A2B4</title>
        <c>
          <title>A2B4C5</title>
          <d>
            <title>A2B4C5D3</title>
            <e>
              <title>A2B4C5D3E1</title>
            </e>
          </d>
        </c>
      </b>
    </a>
    <a>
      <title>A3</title>
      <b>
        <title>A3B5</title>
        <c>
          <title>A3B5C6</title>
          <d>
            <title>A3B5C6D4</title>
            <e>
              <title>A3B5C6D4E2</title>
            </e>
          </d>
          <d>
            <title>A3B5C6D5</title>
            <e>
              <title>A3B5C6D5E3</title>
            </e>
          </d>
        </c>
        <c>
          <title>A3B5C7</title>
          <d>
            <title>A3B5C7D6</title>
          </d>
          <d>
            <title>A3B5C7D7</title>
             <e>
              <title>A3B5C7D7E4</title>
            </e>
            <e>
              <title>A3B5C7D7E5</title>
            </e>
            <e>
              <title>A3B5C7D7E6</title>
            </e>
         </d>
          <d>
            <title>A3B5C7D8</title>
          </d>
        </c>
      </b>
      <b>
        <title>A3B6</title>
      </b>
      <b>
        <title>A3B7</title>
      </b>
      <b>
        <title>A3B8</title>
      </b>
      <b>
        <title>A3B9</title>
        <c>
          <title>A3B9C8</title>
          <d>
            <title>A3B9C8D9</title>
            <e>
              <title>A3B9C8D9E7</title>
            </e>
          </d>
        </c>
      </b>
    </a>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select06.xsl
  
  Index: select06.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select06 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 8 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test nesting of for-each.-->
  
  <xsl:template match="/doc">
    <out>
      <xsl:for-each select="a">
        Inside an A node
        <xsl:for-each select="b">
          <xsl:for-each select="c">
            <xsl:for-each select="d">|
              <xsl:for-each select="e"><xsl:value-of 
select="title"/>,</xsl:for-each>
            </xsl:for-each>Finished C node: <xsl:value-of select="title"/>
          </xsl:for-each>
        </xsl:for-each>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select07.xml
  
  Index: select07.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <inner>content</inner>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select07.xsl
  
  Index: select07.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select07 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.1.2 Creating Elements -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Try to put out computed text without any tags.-->
  
  <xsl:output method="text"/>
  
  <xsl:template match="doc">
    <xsl:value-of select="inner"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select08.xml
  
  Index: select08.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <foo test="true"/>
    <sub test="false"/>
    <foo test="false"/>
    <bar test="true"/>
    <wiz test="false"/>
    <sub test="true"/>
    <wiz test="true"/>
    <foo test="true"/>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select08.xsl
  
  Index: select08.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select08 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.4 Top-level parameters -->
    <!-- Purpose: Test assignment of a node-set to a parameter, then use in 
select. -->
    <!-- Creator: David Marston -->
  
  <xsl:param name="truenodes" select="/doc/[EMAIL PROTECTED]'true']"/>
  
  <xsl:template match="doc">
    <out>
      <xsl:apply-templates select="$truenodes"/>
    </out>
  </xsl:template>
  
  <xsl:template match="foo">
    <xsl:text>Got a foo node;</xsl:text>
  </xsl:template>
  
  <xsl:template match="wiz">
    <xsl:text>Got a wiz node;</xsl:text>
  </xsl:template>
  
  <xsl:template match="node()">
    <xsl:text>Got some other node;
  </xsl:text>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select09.xml
  
  Index: select09.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <foo test="true"/>
    <sub test="false"/>
    <foo test="false"/>
    <bar test="true"/>
    <wiz test="false"/>
    <sub test="true"/>
    <wiz test="true"/>
    <foo test="true"/>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select09.xsl
  
  Index: select09.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select09 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11 Parameters -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test assignment of a node-set to a local parameter, then use 
in select. -->
  
  <xsl:template match="doc">
    <xsl:param name="truenodes" select="[EMAIL PROTECTED]'true']"/>
    <out>
      <xsl:apply-templates select="$truenodes"/>
    </out>
  </xsl:template>
  
  <xsl:template match="foo">
    <xsl:text>Got a foo node;</xsl:text>
  </xsl:template>
  
  <xsl:template match="wiz">
    <xsl:text>Got a wiz node;</xsl:text>
  </xsl:template>
  
  <xsl:template match="node()">
    <xsl:text>Got some other node;
  </xsl:text>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select10.xml
  
  Index: select10.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <critter type="dog"><name>Lassie</name></critter>
    <human><name>Anne</name></human>
    <critter type="dog"><name>Wishbone</name></critter>
    <critter type="cat"><name>Felix</name></critter>
    <critter type="cat"><name>Sylvester</name></critter>
    <critter type="porcupine"><name>Porky</name></critter>
    <human><name>Elissa</name></human>
    <critter type="cat"><name>TopCat</name></critter>
    <critter type="turtle"><name>Churchy</name></critter>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select10.xsl
  
  Index: select10.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select10 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 8 Repetition -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for-each with select expression in a global variable. -->
  
  <xsl:variable name="which" select="/doc/[EMAIL PROTECTED]'cat']"/>
  
  <xsl:template match="/doc">
    <out>
      <xsl:for-each select="$which">
        <xsl:value-of select="name"/><xsl:text>,</xsl:text>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select11.xml
  
  Index: select11.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <critter type="dog"><name>Lassie</name></critter>
    <human><name>Anne</name></human>
    <critter type="dog"><name>Wishbone</name></critter>
    <critter type="cat"><name>Felix</name></critter>
    <critter type="cat"><name>Sylvester</name></critter>
    <critter type="porcupine"><name>Porky</name></critter>
    <human><name>Elissa</name></human>
    <critter type="cat"><name>TopCat</name></critter>
    <critter type="turtle"><name>Churchy</name></critter>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select11.xsl
  
  Index: select11.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select11 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 8 Repetition -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for-each with select expression in a local variable. -->
  
  <xsl:template match="/doc">
    <xsl:variable name="which" select="human"/>
    <out>
      <xsl:for-each select="$which">
        <xsl:value-of select="name"/><xsl:text>,</xsl:text>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select12.xml
  
  Index: select12.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <a><b attr="test"/></a>
    <c>
      <d>
        <e/>
      </d>
    </c>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select12.xsl
  
  Index: select12.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select12 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 2 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for select that comes up empty.-->
  
  <xsl:template match="/">
    <out>
      <xsl:for-each select="doc//Q">
        <xsl:text>Found a Q!</xsl:text>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select13.xml
  
  Index: select13.xml
  ===================================================================
  <?xml version="1.0"?>
  <!-- Top comment -->
  <OL>
    <LI>item1</LI>
    <!-- Upper Middle comment -->
    <LI>item2</LI>
    <LI>item3</LI>
    <OL>
      <LI>subitem1</LI>
      <LI>subitem2</LI>
      <OL>
        <!-- Lower Middle comment -->
        <LI>subsubitem</LI>
        <tag/>
      </OL>
    </OL>
  </OL>
  <!-- Bottom comment -->
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select13.xsl
  
  Index: select13.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select13 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 8 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test that for-each doesn't care about current node -->
  
  <!-- Collect a node-set, outside any template -->
  <xsl:param name="all" select="//OL"/>
  
  <xsl:template match="/">
    <out>
      <xsl:for-each select="//comment()">
        <xsl:value-of select="."/><xsl:text>
  </xsl:text>
      </xsl:for-each>
      <xsl:apply-templates select="OL//tag"/>
    </out>
  </xsl:template>
  
  <xsl:template match="tag">
    <xsl:text>Found the tag...
  </xsl:text>
    <xsl:for-each select="$all/LI">
      <xsl:value-of select="."/><xsl:text>
  </xsl:text>
    </xsl:for-each>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select15.xml
  
  Index: select15.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <child>bad1
      <sub>bad2</sub>
    </child>
    <c>bad3
      <sub>bad4</sub>
    </c>
    <sub>OK
      <nogo>bad5</nogo>
    </sub>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select15.xsl
  
  Index: select15.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select15 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName followed by :: must be recognized as an AxisName. -->
  
  <xsl:template match="doc">
    <out>
      <xsl:for-each select="child::sub">
        <xsl:value-of select="./text()"/>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select16.xml
  
  Index: select16.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <child>bad1
      <sub>bad2</sub>
    </child>
    <c>bad3
      <sub>bad4</sub>
    </c>
    <sub>OK
      <nogo>bad5</nogo>
    </sub>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select16.xsl
  
  Index: select16.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select16 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName followed by :: must be recognized as an AxisName,
        even if there is intervening whitespace. -->
  
  <xsl:template match="doc">
    <out>
      <xsl:for-each select="child :: sub">
        <xsl:value-of select="./text()"/>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select17.xml
  
  Index: select17.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>bad0
    <!-- Good -->
    <comment>bad1
      <sub>bad2</sub>
    </comment>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select17.xsl
  
  Index: select17.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select17 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName followed by ( must be recognized as a NodeType
        or FunctionName. -->
  
  <xsl:template match="doc">
    <out>
      <xsl:for-each select="comment()">
        <xsl:copy/>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select18.xml
  
  Index: select18.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>bad0
    <!-- Good -->
    <comment>bad1
      <sub>bad2</sub>
    </comment>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select18.xsl
  
  Index: select18.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select18 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName followed by ( must be recognized as a NodeType
        or FunctionName, even if there is intervening whitespace. -->
  
  <xsl:template match="doc">
    <out>
      <xsl:for-each select="comment ()">
        <xsl:copy/>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select19.xml
  
  Index: select19.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>bad0
    <string-length>ThisIsBad
      <sub>ThisIsWorse</sub>
    </string-length>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select19.xsl
  
  Index: select19.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select19 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName followed by ( must be recognized as a NodeType
        or FunctionName. -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="string-length()"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select20.xml
  
  Index: select20.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>bad0
    <string-length>ThisIsBad
      <sub>ThisIsWorse</sub>
    </string-length>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select20.xsl
  
  Index: select20.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select20 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName followed by ( must be recognized as a NodeType
        or FunctionName, even if there is intervening whitespace. -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="string-length ()"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select21.xml
  
  Index: select21.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <div>9</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select21.xsl
  
  Index: select21.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select21 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName as first item must not be treated as an operator -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="div +3"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select22.xml
  
  Index: select22.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <div>9</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select22.xsl
  
  Index: select22.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select22 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: * as first item must not be treated as an operator -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="* +3"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select23.xml
  
  Index: select23.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc div="20" div-5="12">
    <div>9</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select23.xsl
  
  Index: select23.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select23 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName after @ must not be treated as an operator -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="@div - 5"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select24.xml
  
  Index: select24.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc div="20" div-5="12">
    <div>9</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select24.xsl
  
  Index: select24.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select24 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName after @ must not be treated as an operator; space 
after is questionable. -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="@div -5"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select25.xml
  
  Index: select25.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc div="20" div-5="12">
    <div>9</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select25.xsl
  
  Index: select25.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select25 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName after @ must not be treated as an operator;
       lack of spaces around hyphen makes it part of name. -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="@div-5"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select26.xml
  
  Index: select26.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc div="20">
    <div>9</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select26.xsl
  
  Index: select26.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select26 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: * after @ must be treated as all attributes -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="@*-5"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select27.xml
  
  Index: select27.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc div="20">
    <div>9</div>
    <attribute>-5</attribute>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select27.xsl
  
  Index: select27.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select27 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName after :: must be treated as part of path -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="attribute :: div"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select28.xml
  
  Index: select28.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc div="20">
    <div>9</div>
    <attribute>-5</attribute>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select28.xsl
  
  Index: select28.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select28 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName after :: must be treated as part of path -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="attribute :: *"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select29.xml
  
  Index: select29.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc div="20">
    <div>9</div>
    <attribute>8</attribute>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select29.xsl
  
  Index: select29.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select29 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName after ( must not be treated as operator -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="attribute*(div - 4)"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select30.xml
  
  Index: select30.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <div>9</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select30.xsl
  
  Index: select30.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select30 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: * after ( must not be treated as operator, but * after ) is,
       and being tokenized means following * is not (because it follows an 
operator) -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="(* - 4)**"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select31.xml
  
  Index: select31.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <a>x<div>7</div></a>
    <a>y<div>9</div></a>
    <a>z<div>5</div></a>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select31.xsl
  
  Index: select31.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select31 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName after [ must not be treated as operator -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="a[div=9]"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select32.xml
  
  Index: select32.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <a s="v"><b>7</b><c>3</c></a>
    <a s="w"><b>7</b><c>9</c></a>
    <a s="x"><b>9</b><c>2</c></a>
    <a s="y"><b>9</b><c>9</c></a>
    <a s="z"><b>2</b><c>0</c></a>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select32.xsl
  
  Index: select32.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select32 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: * after [ must not be treated as operator -->
  
  <xsl:template match="doc">
    <out>
      <xsl:for-each select="a[*=9]">
        <xsl:value-of select="@s"/>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select33.xml
  
  Index: select33.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <div>9</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select33.xsl
  
  Index: select33.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select33 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: NCName after operator must not be treated as operator -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="16-div"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select34.xml
  
  Index: select34.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <div>9</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select34.xsl
  
  Index: select34.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select34 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: * after (ambiguous) operator must not be treated as operator 
-->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="25-*"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select35.xml
  
  Index: select35.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <div>9</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select35.xsl
  
  Index: select35.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select35 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: * after (named) operator must not be treated as operator -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="54 div*"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select36.xml
  
  Index: select36.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <div>14</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select36.xsl
  
  Index: select36.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select36 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: name after ) must be treated as operator -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="(* - 4) div 2"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select37.xml
  
  Index: select37.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <div>0</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select37.xsl
  
  Index: select37.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select37 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: name after literal should be treated as operator -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="' 6 ' div 2"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select38.xml
  
  Index: select38.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <div>4</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select38.xsl
  
  Index: select38.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select38 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: name after * should not be treated as operator -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="' 6 '*div"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select39.xml
  
  Index: select39.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <div>6</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select39.xsl
  
  Index: select39.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select39 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: . after operator should be treated as path -->
  
  <xsl:template match="doc">
    <out>
      <xsl:apply-templates/>
    </out>
  </xsl:template>
  
  <xsl:template match="div">
    <xsl:value-of select="5.*."/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select40.xml
  
  Index: select40.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <div>6</div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select40.xsl
  
  Index: select40.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select40 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.7 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: * after operator should be treated as path -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="5.+*"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select67.xml
  
  Index: select67.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <document-element>
    <inside/>
  </document-element>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select67.xsl
  
  Index: select67.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select67 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.1 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test that document('') refers to this stylesheet, and exploit
       that fact to choose a template dynamically. Idea from Mike Kay. -->
  
  <xsl:template match="/document-element">
    <xsl:variable name="whichtmplt" select="'this'"/>
    <out>
      <xsl:apply-templates select="document('')/*/xsl:[EMAIL PROTECTED]"/>
      <xsl:apply-templates/>
    </out>
  </xsl:template>
  
  <xsl:template name="this" match="xsl:[EMAIL PROTECTED]'this']">We are inside.
    <xsl:value-of select="name(.)"/>
  </xsl:template>
  
  <xsl:template name="that" match="xsl:[EMAIL PROTECTED]'that']">We are offside.
    <xsl:value-of select="name(.)"/>
  </xsl:template>
  
  <xsl:template name="the_other" match="*">We are generic.
    <xsl:value-of select="name(.)"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select68.xml
  
  Index: select68.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <document-element>
    <chooser>that</chooser>
    <inside flag="okay" xx="indifferent">wrong</inside>
  </document-element>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select68.xsl
  
  Index: select68.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select68 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.1 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test that document('') refers to this stylesheet, and exploit
       that fact to have data file select which template to use. -->
  
  <xsl:template match="/document-element">
    <xsl:variable name="whichtmplt" select="chooser"/>
    <out>
      <xsl:apply-templates select="document('')/*/xsl:[EMAIL PROTECTED]"/>
    </out>
  </xsl:template>
  
  <xsl:template name="this" match="xsl:template">This template.
    <xsl:apply-templates select="document('select68.xml')//inside" 
mode="thismode"/>
  </xsl:template>
  
  <xsl:template name="that" match="xsl:template">That template.
    <xsl:apply-templates select="document('select68.xml')//inside" 
mode="thatmode"/>
  </xsl:template>
  
  <xsl:template match="inside" mode="thismode">We are inside.
    <xsl:value-of select="@xx"/>
  </xsl:template>
  
  <xsl:template match="inside" mode="thatmode">We got inside.
    <xsl:value-of select="@flag"/>
  </xsl:template>
  
  <xsl:template match="inside">We got inside, but modeless.
    <xsl:value-of select="."/>
  </xsl:template>
  
  <xsl:template name="the_other" match="*">We are generic.
    <xsl:value-of select="name(.)"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select69.xml
  
  Index: select69.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <a squish="light" squash="butternut">1</a>
    <a squish="" squeesh="loud">2</a>
    <a squash="butternut" squeesh="">3</a>
    <a squish="heavy" squash="" squeesh="shrill">4</a>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select69.xsl
  
  Index: select69.xsl
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select69 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 2.4 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test whether null string as attribute value causes selection 
problem. -->
  
  <xsl:template match="doc">
    <out>
      <xsl:apply-templates/>
    </out>
  </xsl:template>
  
  <xsl:template match="a">
    <xsl:value-of select="."/><xsl:text>-</xsl:text>
    <xsl:for-each select="attribute::*">
      <xsl:value-of select="."/><xsl:text>|</xsl:text>
    </xsl:for-each>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select70.xml
  
  Index: select70.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <foo>a</foo>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select70.xsl
  
  Index: select70.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: select70 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.4 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Show that current() produces a node-set. -->
  
  <xsl:template match="doc">
    <out>
      <xsl:for-each select="current()">
        <xsl:value-of select="."/>
      </xsl:for-each>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select71.xml
  
  Index: select71.xml
  ===================================================================
  <?xml version="1.0"?> 
  <directions>
        <north>
                <dup1/>
                <dup2/>
                <south/>
                <east/>
                <west/>
        </north>
        <north1/>
        <north2>
                <dup1/>
                <dup2/>
                <dup3/>
                <dup4/>
        </north2>
        <north3>
                <dup1/>
                <dup2/>
                <south-north/>
                <east-north/>
                <west-north/>
        </north3>
        <south/>
        <east>
                <dup1/>
                <dup2/>
                <north-east/>
                <south-east/>
                <west-east/>
        </east>
        <west/>
  </directions>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select71.xsl
  
  Index: select71.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  <xsl:output indent="yes"/>
  
    <!-- FileName:  select71 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 3.3 Nodesets. -->
    <!-- Purpose: test union operator using overlapping node-sets. Results 
should
         always be output in doc order regardless of order of select attribute. 
-->
    <!-- Creator: Paul Dick -->
  
  <xsl:template match="directions">
  <out><xsl:text>
  </xsl:text>
  <xsl:copy-of select="north/* | north/dup1 | north/dup2"/>,
  <xsl:copy-of select="north/dup2 | north/dup1 | north/*"/>,
  <xsl:copy-of select="//north/dup2 | south/preceding-sibling[4] | north/dup1 | 
north/*"/>,
  <xsl:copy-of select="north/dup2 | 
document('select71.xml')/south/preceding-sibling[4] | north/*"/>
  </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/select/select72.xml
  
  Index: select72.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <sub1>
      <child1>child1</child1>
    </sub1>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/select01.xml
  
  Index: select01.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <a><b attr="test"/></a>
    <c>
      <d>
        <e/>
      </d>
    </c>
  </doc>
  
  

Reply via email to