You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dm...@apache.org on 2001/11/26 22:42:07 UTC

cvs commit: xml-xalan/test/tests/conf/select/err selecterr23.xsl selecterr20.xsl selecterr21.xml selecterr21.xsl selecterr22.xml selecterr22.xsl selecterr23.xml selecterr20.xml

dmarston    01/11/26 13:42:07

  Added:       test/tests/conf/select/err selecterr23.xsl selecterr20.xsl
                        selecterr21.xml selecterr21.xsl selecterr22.xml
                        selecterr22.xsl selecterr23.xml selecterr20.xml
  Log:
  Extend the coverage of // beyond what selecterr17-19 cover.
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/select/err/selecterr23.xsl
  
  Index: selecterr23.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: selecterr23 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 2.1 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Try '//' followed by a | in a select. -->
    <!-- ExpectedException: Abbreviation '//' must be followed by a step expression -->
    <!-- ExpectedException: Unexpected token -->
  
  <xsl:template match="doc">
    <out>
      <xsl:apply-templates select="foo"/>
    </out>
  </xsl:template>
  
  <xsl:template match="foo">
    <subs><xsl:value-of select="//|subitem"/></subs>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/select/err/selecterr20.xsl
  
  Index: selecterr20.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: selecterr20 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 2.1 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Try to select a '//' without a following node-test as a function argument. -->
    <!-- ExpectedException: Abbreviation '//' must be followed by a step expression -->
  
  <xsl:template match="doc">
    <out>
      <xsl:apply-templates select="foo"/>
    </out>
  </xsl:template>
  
  <xsl:template match="foo">
    <count><xsl:value-of select="count(//)"/></count>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/select/err/selecterr21.xml
  
  Index: selecterr21.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <foo name="x">5
      <item type="z">a</item>
      <item type="c">
        <subitem>OK</subitem>
      </item>
      <item type="x">c</item>
    </foo>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/err/selecterr21.xsl
  
  Index: selecterr21.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: selecterr21 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 2.1 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Try '//' followed by a comma as a function argument. -->
    <!-- ExpectedException: Abbreviation '//' must be followed by a step expression -->
    <!-- ExpectedException: Unexpected token -->
  
  <xsl:template match="doc">
    <out>
      <xsl:apply-templates select="foo"/>
    </out>
  </xsl:template>
  
  <xsl:template match="foo">
    <subs><xsl:value-of select="substring-after(//,'O')"/></subs>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/select/err/selecterr22.xml
  
  Index: selecterr22.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <foo name="x">5
      <item type="z">a</item>
      <item type="c">
        <subitem>OK</subitem>
      </item>
      <item type="x">c</item>
    </foo>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/err/selecterr22.xsl
  
  Index: selecterr22.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: selecterr22 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 2.1 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Try '//' followed by a + as a function argument. -->
    <!-- ExpectedException: Abbreviation '//' must be followed by a step expression -->
    <!-- ExpectedException: Unexpected token -->
  
  <xsl:template match="doc">
    <out>
      <xsl:apply-templates select="foo"/>
    </out>
  </xsl:template>
  
  <xsl:template match="foo">
    <subs><xsl:value-of select="//+17"/></subs>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/select/err/selecterr23.xml
  
  Index: selecterr23.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <foo name="x">5
      <item type="z">a</item>
      <item type="c">
        <subitem>OK</subitem>
      </item>
      <item type="x">c</item>
    </foo>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/select/err/selecterr20.xml
  
  Index: selecterr20.xml
  ===================================================================
  <?xml version="1.0"?> 
  <doc>
    <foo name="x">
      <item type="z">a</item>
      <item type="c">
        <subitem>OK</subitem>
      </item>
      <item type="x">c</item>
    </foo>
  </doc>
  
  

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