Bug #30386: split test sort-012 in error scenario (which was the original) and a fixed test (without collation attribute), see bug report for discussion/motivation (https://www.w3.org/Bugs/Public/show_bug.cgi?id=30386)
authorabraaksm
Thu, 27 Dec 2018 03:45:13 +0100
changeset 1945 3bf05a1d4c18
parent 1944 b31a8b864dac
child 1946 6de9aa12dc4f
Bug #30386: split test sort-012 in error scenario (which was the original) and a fixed test (without collation attribute), see bug report for discussion/motivation (https://www.w3.org/Bugs/Public/show_bug.cgi?id=30386)
tests/insn/sort/_sort-test-set.xml
tests/insn/sort/sort-012.xsl
--- a/tests/insn/sort/_sort-test-set.xml	Sun Dec 23 01:23:01 2018 +0100
+++ b/tests/insn/sort/_sort-test-set.xml	Thu Dec 27 03:45:13 2018 +0100
@@ -290,6 +290,7 @@
    <test-case name="sort-012">
       <description>Test xsl:sort with sort parameters given as AVTs, changing the values on successive runs</description>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Abel Braaksma" on="2018-12-27" change="W3C Bug #30386: Removed collation attribute from xsl:sort, as it would throw an error XTDE1030, see sort-012err" />
       <environment ref="sort008"/>
       <dependencies>
          <spec value="XSLT10+"/>
@@ -302,6 +303,21 @@
       </result>
    </test-case>
 
+   <test-case name="sort-012err">
+      <description>Originally this was sort-012, see bug #30386. Combination of data-type="number" and collation is an error.</description>
+      <created by="Abel Braaksma" on="2018-12-27"/>
+      <environment ref="sort008"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="sort-012err.xsl"/>
+      </test>
+      <result>
+         <error code="XTDE1030" />
+      </result>
+   </test-case>
+
    <test-case name="sort-013">
       <description>Test xsl:perform-sort</description>
       <created by="Michael Kay" on="2012-11-07"/>
--- a/tests/insn/sort/sort-012.xsl	Sun Dec 23 01:23:01 2018 +0100
+++ b/tests/insn/sort/sort-012.xsl	Thu Dec 27 03:45:13 2018 +0100
@@ -30,7 +30,7 @@
     <xsl:param name="data-type" select="'text'"/>
     <run>
       <xsl:for-each select="/doc/num[number(.) = number(.)]"> <!-- exclude the NaN values -->
-        <xsl:sort data-type="{$data-type}" order="{$order}" collation="http://www.w3.org/2005/xpath-functions/collation/codepoint"/>
+        <xsl:sort data-type="{$data-type}" order="{$order}"/>
         <o><xsl:value-of select="."/></o>;
       </xsl:for-each>
     </run>