Drop xsl:attribute/@on-empty tests (spec change)
authorMichael Kay <mike@saxonica.com>
Wed, 10 Sep 2014 23:29:19 +0100
changeset 668 1fa14789e1b1
parent 667 33a47b04b02f
child 669 beb5b20139bf
Drop xsl:attribute/@on-empty tests (spec change)
tests/insn/attribute/_attribute-test-set.xml
tests/insn/attribute/attribute-0006.xsl
tests/insn/attribute/attribute-0007.xsl
tests/insn/attribute/attribute-0008.xsl
tests/insn/attribute/attribute-0009.xsl
tests/insn/attribute/attribute-0010.xsl
tests/insn/attribute/attribute-0011.xsl
--- a/tests/insn/attribute/_attribute-test-set.xml	Wed Sep 10 23:24:03 2014 +0100
+++ b/tests/insn/attribute/_attribute-test-set.xml	Wed Sep 10 23:29:19 2014 +0100
@@ -145,98 +145,6 @@
       </result>
    </test-case>
 
-   <test-case name="attribute-0006">
-      <description>Use on-empty attribute on xsl:attribute (XSLT 3.0) - in element constructor</description>
-      <created by="Michael Kay" on="2012-11-07"/>
-      <dependencies>
-         <spec value="XSLT30+"/>
-      </dependencies>
-      <test>
-         <stylesheet file="attribute-0006.xsl"/>
-         <initial-template name="main"/>
-      </test>
-      <result>
-         <assert-xml><![CDATA[<out><test68 b="blue"/></out>]]></assert-xml>
-      </result>
-   </test-case>
-
-   <test-case name="attribute-0007">
-      <description>Use on-empty attribute on xsl:attribute (XSLT 3.0) - freestanding</description>
-      <created by="Michael Kay" on="2012-11-07"/>
-      <dependencies>
-         <spec value="XSLT30+"/>
-      </dependencies>
-      <test>
-         <stylesheet file="attribute-0007.xsl"/>
-         <initial-template name="main"/>
-      </test>
-      <result>
-         <assert-xml><![CDATA[<atrs69/>]]></assert-xml>
-      </result>
-   </test-case>
-   
-   <test-case name="attribute-0008">
-      <description>Use on-empty attribute on xsl:attribute (XSLT 3.0) - returning an attribute node</description>
-      <created by="Michael Kay" on="2013-07-29"/>
-      <modified by="Michael Kay" on="2013-10-14" change="changed test to deliver expected results"/>
-      <dependencies>
-         <spec value="XSLT30+"/>
-      </dependencies>
-      <test>
-         <stylesheet file="attribute-0008.xsl"/>
-         <initial-template name="main"/>
-      </test>
-      <result>
-         <assert-xml><![CDATA[<test68 b="blue" z="azure"/>]]></assert-xml>
-      </result>
-   </test-case>
-   
-   <test-case name="attribute-0009">
-      <description>Use on-empty attribute on xsl:attribute (XSLT 3.0) - returning two attribute nodes (type error)</description>
-      <created by="Michael Kay" on="2013-07-29"/>
-      <dependencies>
-         <spec value="XSLT30+"/>
-      </dependencies>
-      <test>
-         <stylesheet file="attribute-0009.xsl"/>
-         <initial-template name="main"/>
-      </test>
-      <result>
-         <error code="XTTE3320"/>
-      </result>
-   </test-case>
-   
-   <test-case name="attribute-0010">
-      <description>Use on-empty attribute on xsl:attribute (XSLT 3.0) - returning namespace node (type error)</description>
-      <created by="Michael Kay" on="2013-07-29"/>
-      <dependencies>
-         <spec value="XSLT30+"/>
-      </dependencies>
-      <test>
-         <stylesheet file="attribute-0010.xsl"/>
-         <initial-template name="main"/>
-      </test>
-      <result>
-         <error code="XTTE3320"/>
-      </result>
-   </test-case>
-   
-   <test-case name="attribute-0011">
-      <description>Use on-empty attribute on xsl:attribute (XSLT 3.0) - returns attribute that fails validation</description>
-      <created by="Michael Kay" on="2013-07-29"/>
-      <dependencies>
-         <spec value="XSLT30+"/>
-         <feature value="schema_aware"/>
-      </dependencies>
-      <test>
-         <stylesheet file="attribute-0011.xsl"/>
-         <initial-template name="main"/>
-      </test>
-      <result>
-         <error code="XTTE3320"/>
-      </result>
-   </test-case>
-
    <test-case name="attribute-0301">
       <description>test use of non-ASCII characters in URL and non-URL attributes using HTML output method</description>
       <created by="Michael Kay" on="2012-11-07"/>
--- a/tests/insn/attribute/attribute-0006.xsl	Wed Sep 10 23:24:03 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-<?xml version="1.0"?> 
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
-
-  <!-- PURPOSE: XSLT 3.0 on-empty attribute. -->
-  <?spec xslt#attribute-sets?>
-  
-  <xsl:param name="aname" select="'a'"/>
-  <xsl:param name="color" select="()"/>
-  <xsl:param name="texture" select="()"/>
-
-  <xsl:template match="/" name="main">
-    <out>
-      <test68>
-        <xsl:attribute name="{$aname}" select="$color" on-empty="()"/>
-        <xsl:attribute name="b" select="if (exists($color)) then 'green' else 'blue'" on-empty="()"/>
-        <xsl:attribute name="c" select="if (exists($color)) then 'green' else ''" on-empty="()"/>
-      </test68>
-    </out>
-  </xsl:template>
-
-</xsl:stylesheet>
--- a/tests/insn/attribute/attribute-0007.xsl	Wed Sep 10 23:24:03 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-<?xml version="1.0"?> 
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
-  xmlns:f="http://localhost/" exclude-result-prefixes="f">
-
-  <!-- PURPOSE: XSLT 3.0 on-empty attribute. -->
-  
-  <!-- This test is rather artificial; it is written to force Saxon down a path that is only used when creating
-  parentless attribute nodes -->
-  
-  <?spec xslt#attribute-sets?>
-  
-  <xsl:param name="aname" select="'a'"/>
-  <xsl:param name="color" select="()"/>
-  <xsl:param name="texture" select="()"/>
-
- 
-
-  <xsl:template match="/" name="main">
-    <xsl:variable name="a" as="attribute(*)?" select="f:makeAtt($aname, $color)"/>
-
-      <atrs69>
-        <xsl:if test="exists($a)">
-          <xsl:value-of select="'[', string($a), ']'"/>
-        </xsl:if>
-      </atrs69>
-    
-  </xsl:template>
-  
-  <xsl:function name="f:makeAtt" as="attribute(*)?">
-    <xsl:param name="aname"/>
-    <xsl:param name="avalue"/>
-    <!-- make the function appear recursive to prevent inlining -->
-    <xsl:if test="string-length($aname) > 10000">
-      <xsl:sequence select="f:makeAtt(substring($aname, 10), $avalue)"/>
-    </xsl:if>
-    <xsl:attribute name="{$aname}" select="$color" on-empty="()"/>
-  </xsl:function>
-
-</xsl:stylesheet>
--- a/tests/insn/attribute/attribute-0008.xsl	Wed Sep 10 23:24:03 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-<?xml version="1.0"?> 
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
-
-  <!-- PURPOSE: XSLT 3.0 on-empty attribute creating an attribute. -->
-  <?spec xslt#attribute-sets?>
-  
-  <xsl:param name="aname" select="'a'"/>
-  <xsl:param name="color" select="()"/>
-  <xsl:param name="texture" select="()"/>
-  <xsl:variable name="z" as="attribute()">
-    <xsl:attribute name="z">azure</xsl:attribute>
-  </xsl:variable>
-
-  <xsl:template match="/" name="main">
-      <test68>
-        <xsl:attribute name="{$aname}" select="$color" on-empty="()"/>
-        <xsl:attribute name="b" select="if (exists($color)) then 'green' else 'blue'" on-empty="()"/>
-        <xsl:attribute name="c" select="if (exists($color)) then 'green' else ''" on-empty="$z"/>
-      </test68>
-  </xsl:template>
-
-</xsl:stylesheet>
--- a/tests/insn/attribute/attribute-0009.xsl	Wed Sep 10 23:24:03 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-<?xml version="1.0"?> 
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
-
-  <!-- PURPOSE: XSLT 3.0 on-empty attribute creating two attributes (type error). -->
-  <?spec xslt#attribute-sets?>
-  
-  <xsl:param name="aname" select="'a'"/>
-  <xsl:param name="color" select="()"/>
-  <xsl:param name="texture" select="()"/>
-  <xsl:variable name="z" as="attribute()*">
-    <xsl:attribute name="y">yellow</xsl:attribute>
-    <xsl:attribute name="z">azure</xsl:attribute>
-  </xsl:variable>
-
-  <xsl:template match="/" name="main">
-    <out>
-      <test68>
-        <xsl:attribute name="{$aname}" select="$color" on-empty="()"/>
-        <xsl:attribute name="b" select="if (exists($color)) then 'green' else 'blue'" on-empty="()"/>
-        <xsl:attribute name="c" select="if (exists($color)) then 'green' else ''" on-empty="$z"/>
-      </test68>
-    </out>
-  </xsl:template>
-
-</xsl:stylesheet>
--- a/tests/insn/attribute/attribute-0010.xsl	Wed Sep 10 23:24:03 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-<?xml version="1.0"?> 
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
-
-  <!-- PURPOSE: XSLT 3.0 on-empty attribute creating a namespace node (type error). -->
-  
-  <xsl:param name="aname" select="'a'"/>
-  <xsl:param name="color" select="()"/>
-  <xsl:param name="texture" select="()"/>
-  <xsl:param name="z" as="node()?">
-    <xsl:namespace name="y">http://www.w3.org/2001/Magic</xsl:namespace>
-  </xsl:param>
-
-  <xsl:template match="/" name="main">
-    <out>
-      <test68>
-        <xsl:attribute name="{$aname}" select="$color" on-empty="()"/>
-        <xsl:attribute name="b" select="if (exists($color)) then 'green' else 'blue'" on-empty="()"/>
-        <xsl:attribute name="c" select="if (exists($color)) then 'green' else ''" on-empty="$z"/>
-      </test68>
-    </out>
-  </xsl:template>
-
-</xsl:stylesheet>
--- a/tests/insn/attribute/attribute-0011.xsl	Wed Sep 10 23:24:03 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-<?xml version="1.0"?> 
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
-  xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
-
-  <!-- PURPOSE: XSLT 3.0 on-empty attribute creating an attribute that fails validation. -->
-  
-  <xsl:param name="aname" select="'a'"/>
-  <xsl:param name="color" select="()"/>
-  <xsl:param name="texture" select="()"/>
-  <xsl:param name="z" as="node()?">
-    <xsl:attribute name="y">http://www.w3.org/2001/Magic</xsl:attribute>
-  </xsl:param>
-
-  <xsl:template match="/" name="main">
-    <out>
-      <test68>
-        <xsl:attribute name="{$aname}" select="$color" on-empty="()"/>
-        <xsl:attribute name="b" select="if (exists($color)) then 'green' else 'blue'" on-empty="()"/>
-        <xsl:attribute name="c" select="if (exists($color)) then '3' else ''" type="xs:integer" on-empty="$z"/>
-      </test68>
-    </out>
-  </xsl:template>
-
-</xsl:stylesheet>