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 2002/11/06 19:30:59 UTC

cvs commit: xml-xalan/test/tests/conf/position position105.xsl position103.xsl position104.xml position104.xsl position105.xml position103.xml

dmarston    2002/11/06 10:30:59

  Added:       test/tests/conf/position position105.xsl position103.xsl
                        position104.xml position104.xsl position105.xml
                        position103.xml
  Log:
  Bugzilla #13501 work showed that we should put last() under
  more stress.
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/position/position105.xsl
  
  Index: position105.xsl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: position105 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 4.1 -->
    <!-- Creator: Ilene Seelemann -->
    <!-- Purpose: Test last() in a numeric expression and double predicate. -->
  
  <xsl:output method="xml" encoding="UTF-8"/>
  
  <xsl:template match="doc">  
    <out>
      <xsl:apply-templates select="item[last()-1][1]"/> 
      <xsl:text>, </xsl:text>
      <xsl:apply-templates select="item[last()-1][last()]"/> 
    </out> 
  </xsl:template>
  
  <xsl:template match="item">
    <xsl:value-of select="."/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/position/position103.xsl
  
  Index: position103.xsl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: position103 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 4.1 -->
    <!-- Creator: Igor Hersht -->
    <!-- Purpose: Ensure that last() takes on new value when context changes -->
  
  <xsl:output method="xml" indent="no" encoding="UTF-8"/>
  
  <xsl:template match="doc">
    <out>
      <xsl:apply-templates select="item[last()-1]"/>
      <xsl:text>, </xsl:text>
      <xsl:apply-templates select="item[last()]"/>
    </out>
  </xsl:template>
  
  <xsl:template match="item">
    <xsl:value-of select="last()"/><!-- should be 1 -->
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/position/position104.xml
  
  Index: position104.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <doc>
    <item>XSLT</item>
    <item>processors</item>
    <item>must</item>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/position/position104.xsl
  
  Index: position104.xsl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: position104 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 4.1 -->
    <!-- Creator: Igor Hersht -->
    <!-- Purpose: Try double positional predicates to ensure they at least raise no error -->
  
  <xsl:output method="xml" indent="no" encoding="UTF-8"/>
  
  <xsl:template match="doc">
    <out>
      <xsl:apply-templates select="item[last()][last()]"/>
      <xsl:text>, </xsl:text>
      <xsl:apply-templates select="item[1][last()]"/>
    </out>
  </xsl:template>
  
  <xsl:template match="item">
    <xsl:value-of select="."/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/position/position105.xml
  
  Index: position105.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <doc> 
    <item>XSLT</item> 
    <item>processors</item> 
    <item>must</item> 
    <item>use</item> 
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/position/position103.xml
  
  Index: position103.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <doc>
    <item>XSLT</item>
    <item>processors</item>
    <item>must</item>
    <item>use</item>
  </doc>
  
  

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