Add expected results for newish tests copy-1220/1
authorMichael Kay <mike@saxonica.com>
Tue, 12 Mar 2019 17:15:33 +0000
changeset 2053 6a8a2d04e099
parent 2052 109cba7405c9
child 2054 e3b9fc0f6ebb
Add expected results for newish tests copy-1220/1
tests/insn/copy/_copy-test-set.xml
tests/insn/copy/copy-1220.xsl
--- a/tests/insn/copy/_copy-test-set.xml	Mon Mar 11 18:13:16 2019 +0000
+++ b/tests/insn/copy/_copy-test-set.xml	Tue Mar 12 17:15:33 2019 +0000
@@ -1404,6 +1404,7 @@
       <description>Test xsl:copy-of with namespaces tree-to-tree; copy-namespaces="yes"</description>
       <created by="Michael Kay" on="2019-02-12"/>
       <modified by="Abel Braaksma" on="2019-02-25" change="Whole testset failed to parse because name='xsl:initial-template' and non-bound xsl namespace. Removed dependency on copy-12 (global context item was not used) an initial-template element, which makes the default (without context item) to be xsl:initial-template"/>
+      <modified by="Michael Kay" on="2019-03-12" change="Add expected results"/>     
       <dependencies>
          <spec value="XSLT30+"/>
       </dependencies>
@@ -1414,8 +1415,10 @@
       </test>
       <result>
          <all-of>
-            <assert>true()</assert>
-            <assert-xml><![CDATA[<out/>]]></assert-xml>
+            <assert>/out/m = 'a : a=http://www.a.com/; w=http://www.w.com/; '</assert>
+            <assert>/out/n = 'aa : =http://www.aa.com/; a=http://www.a.com/; w=http://www.w.com/; '</assert>
+            <assert>/out/o = 'a : =http://www.a.com/; w=http://www.w.com/; '</assert>
+            <assert>/out/p = 'aa : =http://www.a.com/; aa=http://www.aa.com/; w=http://www.w.com/; '</assert>
          </all-of>
       </result>
    </test-case>
@@ -1423,7 +1426,7 @@
    <test-case name="copy-1221">
       <description>Test xsl:copy-of with namespaces tree-to-tree; copy-namespaces="no"</description>
       <created by="Michael Kay" on="2019-02-12"/>
-      <environment ref="copy-12"/>
+      <modified by="Michael Kay" on="2019-03-12" change="Add expected results"/>          
       <dependencies>
          <spec value="XSLT30+"/>
       </dependencies>
@@ -1433,14 +1436,14 @@
       </test>
       <result>
          <all-of>
-            <assert>true()</assert>
-            <assert-xml><![CDATA[<out/>]]></assert-xml>
+            <assert>/out/m = 'a : a=http://www.a.com/; '</assert>
+            <assert>/out/n = 'aa : =http://www.aa.com/; a=http://www.a.com/; '</assert>
+            <assert>/out/o = 'a : =http://www.a.com/; '</assert>
+            <assert>/out/p = 'aa : =http://www.a.com/; '</assert>
          </all-of>
       </result>
    </test-case>
 
-
-
    <test-case name="copy-1301">
       <description>Ensure that external entity reference works in copy.</description>
       <created by="Michael Kay" on="2012-11-07"/>
--- a/tests/insn/copy/copy-1220.xsl	Mon Mar 11 18:13:16 2019 +0000
+++ b/tests/insn/copy/copy-1220.xsl	Tue Mar 12 17:15:33 2019 +0000
@@ -39,7 +39,7 @@
   
 <xsl:function name="Q{f}namespaces" as="xs:string">
   <xsl:param name="node" as="element()"/>
-  <xsl:sequence select="name($node) || ' : ' || string-join(sort($node/namespace::*/(name()||'='||.||';')))"/>
+  <xsl:sequence select="name($node) || ' : ' || string-join(sort($node/namespace::*[name() ne 'xml']/(name()||'='||.||'; ')))"/>
 </xsl:function>  
 
 </xsl:stylesheet>