Change expected result to allow arbitrary namespace prefix
authorMichael Kay <mike@saxonica.com>
Sat, 02 Feb 2019 20:32:25 +0000
changeset 1962 d0bf5d242874
parent 1961 5b44c0b2ce57
child 1963 ee72f5b68fc5
Change expected result to allow arbitrary namespace prefix
tests/type/namespace/_namespace-test-set.xml
--- a/tests/type/namespace/_namespace-test-set.xml	Sat Feb 02 20:31:32 2019 +0000
+++ b/tests/type/namespace/_namespace-test-set.xml	Sat Feb 02 20:32:25 2019 +0000
@@ -3006,6 +3006,7 @@
       <description>Apply namespaces to attributes This 3rd case is a base line and should not have
          associated namespace</description>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Michael Kay" on="2019-01-23" change="namespace prefix for attribute Attr1 is not defined by the spec"/>
       <environment ref="namespace-33"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -3014,8 +3015,14 @@
          <stylesheet file="namespace-3301.xsl"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out xmlns:anamespace="http://foo.com/"><p anamespace:Attr1="true"
-            /><p xmlns:two="http://baz.com/" two:Attr2="true"/><p Attr3="true"/></out>]]></assert-xml>
+         <all-of>
+            <assert>/out/namespace::anamespace="http://foo.com/"</assert>
+            <assert>/out/p[1][@Q{http://foo.com/}Attr1="true"]</assert>
+            <assert>/out/p[2]/@*:Attr2[. = 'true' and namespace-uri() = 'http://baz.com/' and name() = 'two:Attr2']</assert>
+            <assert>/out/p[3]/@*[name()='Attr3' and .='true']</assert>
+         </all-of>
+         <!--<assert-xml><![CDATA[<out xmlns:anamespace="http://foo.com/"><p anamespace:Attr1="true"
+            /><p xmlns:two="http://baz.com/" two:Attr2="true"/><p Attr3="true"/></out>]]></assert-xml>-->
       </result>
    </test-case>
 
@@ -3217,6 +3224,7 @@
       <description>FileName: namespace17 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
          Section: 2.4</description>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Michael Kay" on="2019-01-23" change="Namespace prefix for attribute 'test' is not defined by the spec"/>
       <environment ref="namespace-33"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -3225,7 +3233,12 @@
          <stylesheet file="namespace-3314.xsl"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out><p xmlns:anamespace="http://foo.com/" anamespace:test="true"/></out>]]></assert-xml>
+         <all-of>
+            <assert>/out/p/@*[. = 'true']</assert>
+            <assert>/out/p/@*[name() castable as xs:Name and not(name() castable as xs:NCName)]</assert>
+            <assert>/out/p/@*[namespace-uri() = 'http://foo.com/']</assert>
+         </all-of>
+         <!--<assert-xml><![CDATA[<out><p xmlns:anamespace="http://foo.com/" anamespace:test="true"/></out>]]></assert-xml>-->
       </result>
    </test-case>