Remove unnecessary /copy-of because it makes document order unpredictable
authorMichael Kay <mike@saxonica.com>
Thu, 10 Aug 2017 16:54:23 +0100
changeset 1737 c7584e81c04e
parent 1736 5d237a457819
child 1738 c0fc0b95d637
Remove unnecessary /copy-of because it makes document order unpredictable
tests/type/arrays/_arrays-test-set.xml
tests/type/arrays/square-array-A.xsl
tests/type/arrays/square-array-B.xsl
--- a/tests/type/arrays/_arrays-test-set.xml	Tue Aug 08 17:55:21 2017 +0100
+++ b/tests/type/arrays/_arrays-test-set.xml	Thu Aug 10 16:54:23 2017 +0100
@@ -18,7 +18,7 @@
    </dependencies>
    
    <test-case name="square-array-001">
-      <description>Streaming square-array expression - grounded operand</description>
+      <description>Non-Streaming square-array expression - grounded operand</description>
       <keywords>striding-then-grounded leading-lone-slash PathExpr fn:data ParenthesizedExpr</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -31,7 +31,7 @@
    </test-case>
    
    <test-case name="square-array-002">
-      <description>Streaming square-array expression - grounded operand</description>
+      <description>Non-Streaming square-array expression - grounded operand</description>
       <keywords>leading-lone-slash striding-then-grounded fn:copy-of PathExpr ParenthesizedExpr</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -44,7 +44,7 @@
    </test-case>
    
    <test-case name="square-array-003">
-      <description>Streaming square-array expression - grounded atomic operand</description>
+      <description>Non-Streaming square-array expression - grounded atomic operand</description>
       <keywords>striding-then-grounded leading-lone-slash fn:tokenize ContextItemExpr PathExpr SimpleMapExpr ParenthesizedExpr</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -57,7 +57,7 @@
    </test-case>
    
    <test-case name="square-array-010">
-      <description>Streaming square-array expression - striding operand, inspection usage</description>
+      <description>Non-Streaming square-array expression - striding operand, inspection usage</description>
       <keywords>ParenthesizedExpr mixed-posture striding leading-lone-slash PathExpr fn:count</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -70,7 +70,7 @@
    </test-case>
    
    <test-case name="square-array-011">
-      <description>Streaming square-array expression - striding operand, absorption usage</description>
+      <description>Non-Streaming square-array expression - striding operand, absorption usage</description>
       <keywords>ParenthesizedExpr mixed-posture striding leading-lone-slash PathExpr fn:sum</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -83,7 +83,7 @@
    </test-case>
    
    <test-case name="square-array-012">
-      <description>Streaming square-array expression - striding operand, transmission usage</description>
+      <description>Non-Streaming square-array expression - striding operand, transmission usage</description>
       <keywords>ParenthesizedExpr mixed-posture leading-lone-slash striding motionless-predicate fn:position PathExpr</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -96,7 +96,7 @@
    </test-case>
    
    <test-case name="square-array-013">
-      <description>Streaming square-array expression - striding operand, focus-setting usage</description>
+      <description>Non-Streaming square-array expression - striding operand, focus-setting usage</description>
       <keywords>ParenthesizedExpr mixed-posture AdditiveExpr ContextItemExpr striding leading-lone-slash PathExpr SimpleMapExpr</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -109,7 +109,7 @@
    </test-case> 
    
    <test-case name="square-array-014">
-      <description>Streaming square-array expression - striding operand, focus-controlled usage</description>
+      <description>Non-Streaming square-array expression - striding operand, focus-controlled usage</description>
       <keywords>ParenthesizedExpr mixed-posture leading-lone-slash AxisStep striding PathExpr positional-predicate SimpleMapExpr</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -122,7 +122,7 @@
    </test-case> 
    
    <test-case name="square-array-015">
-      <description>Streaming square-array expression - striding operand, focus-setting usage</description>
+      <description>Non-Streaming square-array expression - striding operand, focus-setting usage</description>
       <keywords>ParenthesizedExpr mixed-posture leading-lone-slash striding PathExpr AdditiveExpr</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -135,7 +135,7 @@
    </test-case> 
    
    <test-case name="square-array-016">
-      <description>Streaming square-array expression - striding operand, focus-controlled usage</description>
+      <description>Non-Streaming square-array expression - striding operand, focus-controlled usage</description>
       <keywords>ParenthesizedExpr mixed-posture xsl:for-each striding AxisStep PathExpr positional-predicate leading-lone-slash</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -148,7 +148,7 @@
    </test-case>
    
    <test-case name="square-array-017">
-      <description>Streaming square-array expression - striding operand, focus-setting usage for inspection action</description>
+      <description>Non-Streaming square-array expression - striding operand, focus-setting usage for inspection action</description>
       <keywords>ParenthesizedExpr mixed-posture leading-lone-slash striding PathExpr positional-predicate SimpleMapExpr fn:name</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -161,7 +161,7 @@
    </test-case>
    
    <test-case name="square-array-018">
-      <description>Streaming square-array expression - striding operand, apply-templates usage</description>
+      <description>Non-Streaming square-array expression - striding operand, apply-templates usage</description>
       <keywords>ParenthesizedExpr mixed-posture leading-lone-slash striding xsl:apply-templates PathExpr positional-predicate</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -174,20 +174,21 @@
    </test-case>
    
    <test-case name="square-array-019">
-      <description>Streaming square-array expression - striding operand, apply-templates to array</description>
+      <description>Non-Streaming square-array expression - striding operand, apply-templates to array</description>
       <keywords>ParenthesizedExpr mixed-posture leading-lone-slash striding xsl:apply-templates PathExpr positional-predicate</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
+      <created by="Michael Kay" on="2017-08-10" change="more precise result assertion"/>
       <environment ref="square-array-A"/>
       <test>
          <initial-template name="r-019"/>
       </test>
       <result>
-         <assert>/out = "Pride and PrejudiceJane AustenModern Library2002-12-31English4.9518706796016863528.3 5.7 1.16.1"</assert>
+         <assert>/out/in = "Pride and PrejudiceJane AustenModern Library2002-12-31English4.9518706796016863528.3 5.7 1.16.1"</assert>
       </result>
    </test-case>
    
    <test-case name="square-array-020">
-      <description>Streaming square-array expression - crawling operand, inspection usage</description>
+      <description>Non-Streaming square-array expression - crawling operand, inspection usage</description>
       <keywords>ParenthesizedExpr mixed-posture xsl:copy-of fn:count crawling PathExpr leading-double-slash</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -200,7 +201,7 @@
    </test-case>
    
    <test-case name="square-array-021">
-      <description>Streaming square-array expression - crawling operand, absorption usage</description>
+      <description>Non-Streaming square-array expression - crawling operand, absorption usage</description>
       <keywords>ParenthesizedExpr mixed-posture leading-lone-slash text-nodes childless-nodes striding-then-crawling fn:count PathExpr positional-predicate</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -213,7 +214,7 @@
    </test-case>
    
    <test-case name="square-array-022">
-      <description>Streaming square-array expression - crawling operand, transmission usage</description>
+      <description>Non-Streaming square-array expression - crawling operand, transmission usage</description>
       <keywords>ParenthesizedExpr mixed-posture striding-then-crawling leading-lone-slash fn:position PathExpr positional-predicate</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -226,7 +227,7 @@
    </test-case>
    
    <test-case name="square-array-023">
-      <description>Streaming square-array expression - crawling operand, focus-setting usage</description>
+      <description>Non-Streaming square-array expression - crawling operand, focus-setting usage</description>
       <keywords>ParenthesizedExpr mixed-posture leading-double-slash childless-nodes text-nodes AdditiveExpr PathExpr crawling SimpleMapExpr</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -239,7 +240,7 @@
    </test-case>
    
    <test-case name="square-array-030">
-      <description>Streaming square-array expression - climbing operand, inspection usage</description>
+      <description>Non-Streaming square-array expression - climbing operand, inspection usage</description>
       <keywords>ParenthesizedExpr mixed-posture striding-then-climbing fn:name leading-lone-slash PathExpr positional-predicate SimpleMapExpr ancestor-axis</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -252,7 +253,7 @@
    </test-case>
    
    <test-case name="square-array-031">
-      <description>Streaming square-array expression - climbing operand, inspection usage, removal of duplicates</description>
+      <description>Non-Streaming square-array expression - climbing operand, inspection usage, removal of duplicates</description>
       <keywords>ParenthesizedExpr mixed-posture leading-lone-slash striding-then-climbing fn:name PathExpr SimpleMapExpr ancestor-axis</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -265,7 +266,7 @@
    </test-case> 
    
    <test-case name="square-array-032">
-      <description>Streaming square-array expression - climbing operand, absorption usage</description>
+      <description>Non-Streaming square-array expression - climbing operand, absorption usage</description>
       <keywords>ParenthesizedExpr mixed-posture climbing-then-climbing attribute-axis PathExpr positional-predicate ancestor-axis leading-lone-slash</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -278,7 +279,7 @@
    </test-case>
    
    <test-case name="square-array-033">
-      <description>Streaming square-array expression - climbing operand, absorption usage, removal of duplicates</description>
+      <description>Non-Streaming square-array expression - climbing operand, absorption usage, removal of duplicates</description>
       <keywords>ParenthesizedExpr mixed-posture climbing-then-climbing leading-lone-slash PathExpr ancestor-or-self-axis climbing</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -291,7 +292,7 @@
    </test-case> 
    
    <test-case name="square-array-034">
-      <description>Streaming square-array expression - climbing operand, absorption usage, removal of duplicates</description>
+      <description>Non-Streaming square-array expression - climbing operand, absorption usage, removal of duplicates</description>
       <keywords>ParenthesizedExpr mixed-posture climbing-then-climbing leading-lone-slash PathExpr ancestor-or-self-axis climbing</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -304,7 +305,7 @@
    </test-case>
    
    <test-case name="square-array-035">
-      <description>Streaming square-array expression - climbing operand, absorption usage, removal of duplicates</description>
+      <description>Non-Streaming square-array expression - climbing operand, absorption usage, removal of duplicates</description>
       <keywords>ParenthesizedExpr mixed-posture crawling-then-climbing leading-double-slash attribute-axis PathExpr ancestor-or-self-axis</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-A"/>
@@ -317,7 +318,7 @@
    </test-case>
    
    <test-case name="square-array-036">
-      <description>Streaming square-array expression - two potentially consuming operands (bug 27668)</description>
+      <description>Non-Streaming square-array expression - two potentially consuming operands (bug 27668)</description>
       <keywords>ParenthesizedExpr mixed-posture crawling-then-climbing leading-double-slash attribute-axis PathExpr ancestor-or-self-axis</keywords>
       <created by="Michael Kay" on="2015-01-15"/>
       <environment ref="square-array-A"/>
@@ -334,9 +335,10 @@
    </test-case>
    
    <test-case name="square-array-040">
-      <description>Streaming square-array expression - bug 29507</description>
+      <description>Non-Streaming square-array expression - bug 29507</description>
       <keywords>ParenthesizedExpr mixed-posture </keywords>
       <created by="Michael Kay" on="2016-12-19"/>
+      <modified by="Michael Kay" on="2017-08-10" change="Remove /copy-of() which makes document order unpredictable"/>
       <environment ref="square-array-A"/>
       <test>
          <initial-template name="r-040"/>
@@ -347,9 +349,10 @@
    </test-case>
    
    <test-case name="square-array-041">
-      <description>Streaming square-array expression - bug 29507</description>
+      <description>Non-Streaming square-array expression - bug 29507</description>
       <keywords>ParenthesizedExpr mixed-posture </keywords>
       <created by="Michael Kay" on="2016-12-19"/>
+      <modified by="Michael Kay" on="2017-08-10" change="Remove /copy-of() which makes document order unpredictable"/>
       <environment ref="square-array-A"/>
       <test>
          <initial-template name="r-041"/>
@@ -363,9 +366,10 @@
    </test-case>
    
    <test-case name="square-array-042">
-      <description>Streaming square-array expression - bug 29507</description>
+      <description>Non-Streaming square-array expression - bug 29507</description>
       <keywords>ParenthesizedExpr mixed-posture </keywords>
       <created by="Michael Kay" on="2016-12-19"/>
+      <modified by="Michael Kay" on="2017-08-10" change="Remove /copy-of() which makes document order unpredictable"/>
       <environment ref="square-array-A"/>
       <test>
          <initial-template name="r-042"/>
@@ -376,9 +380,10 @@
    </test-case>
    
    <test-case name="square-array-043">
-      <description>Streaming square-array expression - bug 29507</description>
+      <description>Non-Streaming square-array expression - bug 29507</description>
       <keywords>ParenthesizedExpr mixed-posture </keywords>
       <created by="Michael Kay" on="2016-12-19"/>
+      <modified by="Michael Kay" on="2017-08-10" change="Remove /copy-of() which makes document order unpredictable"/>
       <environment ref="square-array-A"/>
       <test>
          <initial-template name="r-043"/>
@@ -678,7 +683,7 @@
    </test-case>  
 
    <test-case name="square-array-136">
-      <description>Streaming square-array expression - two potentially consuming operands (bug 27668)</description>
+      <description>Non-Streaming square-array expression - two potentially consuming operands (bug 27668)</description>
       <keywords>ParenthesizedExpr mixed-posture crawling-then-climbing leading-double-slash attribute-axis PathExpr ancestor-or-self-axis</keywords>
       <created by="Michael Kay" on="2016-12-19"/>
       <environment ref="square-array-B"/>
@@ -695,9 +700,10 @@
    </test-case>
    
    <test-case name="square-array-140">
-      <description>Streaming square-array expression - bug 29507</description>
+      <description>Non-Streaming square-array expression - bug 29507</description>
       <keywords>ParenthesizedExpr mixed-posture </keywords>
       <created by="Michael Kay" on="2016-12-19"/>
+      <modified by="Michael Kay" on="2017-08-10" change="Remove /copy-of() which makes document order unpredictable"/>
       <environment ref="square-array-B"/>
       <test>
          <initial-template name="r-040"/>
@@ -708,9 +714,10 @@
    </test-case>
    
    <test-case name="square-array-141">
-      <description>Streaming square-array expression - bug 29507</description>
+      <description>Non-Streaming square-array expression - bug 29507</description>
       <keywords>ParenthesizedExpr mixed-posture </keywords>
       <created by="Michael Kay" on="2016-12-19"/>
+      <modified by="Michael Kay" on="2017-08-10" change="Remove /copy-of() which makes document order unpredictable"/>
       <environment ref="square-array-B"/>
       <test>
          <initial-template name="r-041"/>
@@ -724,9 +731,10 @@
    </test-case>
    
    <test-case name="square-array-142">
-      <description>Streaming square-array expression - bug 29507</description>
+      <description>Non-Streaming square-array expression - bug 29507</description>
       <keywords>ParenthesizedExpr mixed-posture </keywords>
       <created by="Michael Kay" on="2016-12-19"/>
+      <modified by="Michael Kay" on="2017-08-10" change="Remove /copy-of() which makes document order unpredictable"/>
       <environment ref="square-array-B"/>
       <test>
          <initial-template name="r-042"/>
@@ -737,9 +745,10 @@
    </test-case>
    
    <test-case name="square-array-143">
-      <description>Streaming square-array expression - bug 29507</description>
+      <description>Non-Streaming square-array expression - bug 29507</description>
       <keywords>ParenthesizedExpr mixed-posture </keywords>
       <created by="Michael Kay" on="2016-12-19"/>
+      <modified by="Michael Kay" on="2017-08-10" change="Remove /copy-of() which makes document order unpredictable"/>
       <environment ref="square-array-B"/>
       <test>
          <initial-template name="r-043"/>
--- a/tests/type/arrays/square-array-A.xsl	Tue Aug 08 17:55:21 2017 +0100
+++ b/tests/type/arrays/square-array-A.xsl	Thu Aug 10 16:54:23 2017 +0100
@@ -295,7 +295,7 @@
   <xsl:template name="r-040" use-when="$RUN">
     <xsl:source-document streamable="no" href="{$books-doc}">
       <out>
-        <xsl:copy-of select="[$extraItem, /BOOKLIST/BOOKS/ITEM/copy-of()]?*!PRICE"/>
+        <xsl:copy-of select="[$extraItem, /BOOKLIST/BOOKS/ITEM]?*!PRICE"/>
       </out>
     </xsl:source-document>
   </xsl:template> 
@@ -305,7 +305,7 @@
   <xsl:template name="r-041" use-when="$RUN">
     <xsl:source-document streamable="no" href="{$books-doc}">
       <out>
-        <xsl:copy-of select="[$extraItem, /BOOKLIST/BOOKS/ITEM/copy-of()]?* / PRICE"/>
+        <xsl:copy-of select="[$extraItem, /BOOKLIST/BOOKS/ITEM]?* / PRICE"/>
       </out>
     </xsl:source-document>
   </xsl:template> 
@@ -315,7 +315,7 @@
   <xsl:template name="r-042" use-when="$RUN">
     <xsl:source-document streamable="no" href="{$books-doc}">
       <out>
-        <xsl:value-of select="[$extraItem, /BOOKLIST/BOOKS/ITEM/copy-of()]?* !PRICE"/>
+        <xsl:value-of select="[$extraItem, /BOOKLIST/BOOKS/ITEM]?* !PRICE"/>
       </out>
     </xsl:source-document>
   </xsl:template> 
@@ -325,7 +325,7 @@
   <xsl:template name="r-043" use-when="$RUN">
     <xsl:source-document streamable="no" href="{$books-doc}">
       <out>
-        <xsl:value-of select="[$extraItem, /BOOKLIST/BOOKS/ITEM/copy-of()]?* / PRICE"/>
+        <xsl:value-of select="[$extraItem, /BOOKLIST/BOOKS/ITEM]?* / PRICE"/>
       </out>
     </xsl:source-document>
   </xsl:template> 
--- a/tests/type/arrays/square-array-B.xsl	Tue Aug 08 17:55:21 2017 +0100
+++ b/tests/type/arrays/square-array-B.xsl	Thu Aug 10 16:54:23 2017 +0100
@@ -283,7 +283,7 @@
   <xsl:template name="r-040" use-when="$RUN">
     <xsl:source-document streamable="no" href="{$books-doc}">
       <out>
-        <xsl:copy-of select="[/BOOKLIST/BOOKS/ITEM/copy-of(), $extraItem]?*!PRICE"/>
+        <xsl:copy-of select="[/BOOKLIST/BOOKS/ITEM, $extraItem]?*!PRICE"/>
       </out>
     </xsl:source-document>
   </xsl:template> 
@@ -293,7 +293,7 @@
   <xsl:template name="r-041" use-when="$RUN">
     <xsl:source-document streamable="no" href="{$books-doc}">
       <out>
-        <xsl:copy-of select="[/BOOKLIST/BOOKS/ITEM/copy-of(), $extraItem]?* / PRICE"/>
+        <xsl:copy-of select="[/BOOKLIST/BOOKS/ITEM, $extraItem]?* / PRICE"/>
       </out>
     </xsl:source-document>
   </xsl:template> 
@@ -303,7 +303,7 @@
   <xsl:template name="r-042" use-when="$RUN">
     <xsl:source-document streamable="no" href="{$books-doc}">
       <out>
-        <xsl:value-of select="[/BOOKLIST/BOOKS/ITEM/copy-of(), $extraItem]?*!PRICE"/>
+        <xsl:value-of select="[/BOOKLIST/BOOKS/ITEM, $extraItem]?*!PRICE"/>
       </out>
     </xsl:source-document>
   </xsl:template> 
@@ -313,7 +313,7 @@
   <xsl:template name="r-043" use-when="$RUN">
     <xsl:source-document streamable="no" href="{$books-doc}">
       <out>
-        <xsl:value-of select="[/BOOKLIST/BOOKS/ITEM/copy-of(), $extraItem]?* / PRICE"/>
+        <xsl:value-of select="[/BOOKLIST/BOOKS/ITEM, $extraItem]?* / PRICE"/>
       </out>
     </xsl:source-document>
   </xsl:template>