Drop streaming xsl:attribute/@on-empty tests (spec change)
authorMichael Kay <mike@saxonica.com>
Wed, 10 Sep 2014 23:34:35 +0100
changeset 669 beb5b20139bf
parent 668 1fa14789e1b1
child 670 30e49cfcb201
Drop streaming xsl:attribute/@on-empty tests (spec change)
tests/strm/si-attribute/_si-attribute-test-set.xml
tests/strm/si-attribute/si-attribute-A.xsl
--- a/tests/strm/si-attribute/_si-attribute-test-set.xml	Wed Sep 10 23:29:19 2014 +0100
+++ b/tests/strm/si-attribute/_si-attribute-test-set.xml	Wed Sep 10 23:34:35 2014 +0100
@@ -364,90 +364,6 @@
       </result>
    </test-case>
    
-   <test-case name="si-attribute-050">
-      <description>xsl:attribute; value is consuming; on-empty</description>
-      <created by="Michael Kay" on="2014-01-06"/>
-      <environment ref="si-attribute-A"/>
-      <test>
-         <initial-template name="s-050"/>
-      </test>
-      <result>
-         <assert>/out/@a = '4.95 6.58 4.95 4.95 16.47 16.47'</assert>
-      </result>
-   </test-case>
-   
-   <test-case name="si-attribute-051">
-      <description>xsl:attribute; value is consuming; on-empty</description>
-      <created by="Michael Kay" on="2014-01-06"/>
-      <environment ref="si-attribute-A"/>
-      <test>
-         <initial-template name="s-051"/>
-      </test>
-      <result>
-         <assert>empty(/out/@a)</assert>
-      </result>
-   </test-case>
-   
-   <test-case name="si-attribute-052">
-      <description>xsl:attribute; on-empty expression is consuming, but not activated</description>
-      <created by="Michael Kay" on="2014-01-06"/>
-      <environment ref="si-attribute-A"/>
-      <test>
-         <initial-template name="s-052"/>
-      </test>
-      <result>
-         <assert>/out/@a = '1 2 3 4 5 6 7 8 9 10'</assert>
-      </result>
-   </test-case>
-   
-   <test-case name="si-attribute-053">
-      <description>xsl:attribute; on-empty expression is consuming, and is activated</description>
-      <created by="Michael Kay" on="2014-01-06"/>
-      <environment ref="si-attribute-A"/>
-      <test>
-         <initial-template name="s-053"/>
-      </test>
-      <result>
-         <assert>/out/@OWNER = 'MHK'</assert>
-      </result>
-   </test-case>
-   
-   <test-case name="si-attribute-054">
-      <description>xsl:attribute; select is consuming, on-empty is climbing</description>
-      <created by="Michael Kay" on="2014-01-06"/>
-      <environment ref="si-attribute-A"/>
-      <test>
-         <initial-template name="s-054"/>
-      </test>
-      <result>
-         <assert>/out/@OWNER = 'MHK'</assert>
-      </result>
-   </test-case>
-   
-   <test-case name="si-attribute-055">
-      <description>xsl:attribute; select is consuming, on-empty is multiple attributes - type error</description>
-      <created by="Michael Kay" on="2014-01-06"/>
-      <environment ref="si-attribute-A"/>
-      <test>
-         <initial-template name="s-055"/>
-      </test>
-      <result>
-         <error code="XTTE3320"/>
-      </result>
-   </test-case>
-   
-   <test-case name="si-attribute-056">
-      <description>xsl:attribute; select is consuming, on-empty is multiple attributes - type error - caught</description>
-      <created by="Michael Kay" on="2014-01-06"/>
-      <environment ref="si-attribute-A"/>
-      <test>
-         <initial-template name="s-056"/>
-      </test>
-      <result>
-         <assert>/out/@fallback = 'OK'</assert>
-      </result>
-   </test-case>
-   
    <test-case name="si-attribute-057">
       <description>xsl:attribute; content cannot include function items; error</description>
       <created by="Michael Kay" on="2014-01-06"/>
--- a/tests/strm/si-attribute/si-attribute-A.xsl	Wed Sep 10 23:29:19 2014 +0100
+++ b/tests/strm/si-attribute/si-attribute-A.xsl	Wed Sep 10 23:34:35 2014 +0100
@@ -309,100 +309,6 @@
       </xsl:stream>
     </xsl:template>
     
-    <!-- Test of xsl:stream with xsl:attribute/@on-empty (not empty) -->
-    
-    <xsl:template name="s-050" use-when="$RUN">
-      <xsl:stream href="../docs/books.xml">
-        <out>
-          <xsl:attribute name="a" select="./BOOKLIST/BOOKS/ITEM/PRICE" on-empty="()"/>
-        </out>
-      </xsl:stream>
-    </xsl:template>
-    
-    <!-- Test of xsl:stream with xsl:attribute/@on-empty (empty) -->
-    
-    <xsl:template name="s-051" use-when="$RUN">
-      <xsl:stream href="../docs/books.xml">
-        <out>
-          <xsl:attribute name="a" select="./BOOKLIST/BOOKS/ITEM/PRICETAG" on-empty="()"/>
-        </out>
-      </xsl:stream>
-    </xsl:template>
-    
-    <!-- Test of xsl:stream with xsl:attribute/@on-empty, with on-empty consuming (not empty) -->
-    
-    <xsl:template name="s-052" use-when="$RUN">
-      <xsl:stream href="../docs/books.xml">
-        <out>
-          <xsl:attribute name="a" select="1 to 10" on-empty="head(//@*)"/>
-        </out>
-      </xsl:stream>
-    </xsl:template>
-    
-    <!-- Test of xsl:stream with xsl:attribute/@on-empty, with on-empty consuming (empty) -->
-    
-    <xsl:template name="s-053" use-when="$RUN">
-      <xsl:param name="s" select="20"/>
-      <xsl:stream href="../docs/books.xml">
-        <out>
-          <xsl:attribute name="a" select="$s to 10" on-empty="head(//@*)"/>
-        </out>
-      </xsl:stream>
-    </xsl:template>
-    
-    <!-- Test of xsl:stream with xsl:attribute/@on-empty (empty, returns a new attribute) -->
-    
-    <xsl:template name="s-054" use-when="$RUN">
-      <xsl:stream href="../docs/books.xml">
-        <xsl:for-each select="BOOKLIST/BOOKS">
-          <out>
-            <xsl:attribute name="a" select="ITEM/PRICETAG" on-empty="@OWNER"/>
-          </out>
-        </xsl:for-each>  
-      </xsl:stream>
-    </xsl:template>
-    
-    <!-- Test of xsl:stream with xsl:attribute/@on-empty (empty, type error, returns two attributes) -->
-    
-    <xsl:template name="s-055" use-when="$RUN">
-      <xsl:param name="n" select="2"/>
-      <xsl:variable name="atts" as="attribute()*">
-        <xsl:for-each select="1 to $n">
-          <xsl:attribute name="n{.}" select="."/>
-        </xsl:for-each>
-      </xsl:variable>
-      <xsl:stream href="../docs/books.xml">
-        <xsl:for-each select="BOOKLIST/BOOKS">
-          <out>
-            <xsl:attribute name="a" select="ITEM/PRICETAG" on-empty="$atts"/>
-          </out>
-        </xsl:for-each>  
-      </xsl:stream>
-    </xsl:template>
-    
-    <!-- Test of xsl:stream with xsl:attribute/@on-empty (empty, type error, returns two attributes, recovered) -->
-    
-    <xsl:template name="s-056" use-when="$RUN">
-      <xsl:param name="n" select="2"/>
-      <xsl:variable name="atts" as="attribute()*">
-        <xsl:for-each select="1 to $n">
-          <xsl:attribute name="n{.}" select="."/>
-        </xsl:for-each>
-      </xsl:variable>
-      <xsl:stream href="../docs/books.xml">
-        <xsl:for-each select="BOOKLIST/BOOKS">
-          <out>
-            <xsl:try>
-              <xsl:attribute name="a" select="ITEM/PRICETAG" on-empty="$atts"/>
-              <xsl:catch errors="*:XTTE3320">
-                <xsl:attribute name="fallback">OK</xsl:attribute>
-              </xsl:catch>
-            </xsl:try>  
-          </out>
-        </xsl:for-each>  
-      </xsl:stream>
-    </xsl:template>
-    
     <!-- xsl:attribute content cannot contain a function item - error -->
     
     <xsl:template name="s-057" use-when="$RUN">