Merge the test sets "collations" and "collation" and change to use UCA collation URIs
authorMichael Kay <mike@saxonica.com>
Thu, 11 Jan 2018 17:28:30 +0000
changeset 1805 c82b6e3631ed
parent 1804 6bb9c0c7f9b5
child 1806 ecfdc9581012
Merge the test sets "collations" and "collation" and change to use UCA collation URIs
tests/fn/collation/collation-001.out
tests/fn/collation/collation-001.xsl
tests/fn/collation/collation-002.out
tests/fn/collation/collation-002.xsl
tests/fn/collation/collation-003.out
tests/fn/collation/collation-003.xsl
tests/fn/collation/collation-004.xsl
tests/fn/collation/collation-005.xsl
tests/misc/collations/_collations-test-set.xml
tests/misc/collations/collation.dtd
tests/misc/collations/collations-0201.xsl
tests/misc/collations/collations-0401.xsl
tests/misc/collations/collations-0402.xsl
tests/misc/collations/collations-0403.xsl
tests/misc/collations/collations-1001.out
tests/misc/collations/collations-1001.xsl
tests/misc/collations/collations-1002.out
tests/misc/collations/collations-1002.xsl
tests/misc/collations/collations-1003.out
tests/misc/collations/collations-1003.xsl
tests/misc/collations/collations-1004.xsl
tests/misc/collations/collations-1005.xsl
--- a/tests/fn/collation/collation-001.out	Thu Jan 11 17:27:35 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<out>
-<Compare>-1</Compare>
-<Contains>false</Contains>
-<Starts-with>false</Starts-with>
-<Ends-with>false</Ends-with>
-<Subtring-before/>
-<Substring-after/>
-<Index-of/>
-<Distinct-values>Strasse Straß</Distinct-values>
-<Deep-equal>false</Deep-equal>
-<Max>ä</Max>
-<Min>ä</Min>
-</out>
\ No newline at end of file
--- a/tests/fn/collation/collation-001.xsl	Thu Jan 11 17:27:35 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: To verify that the implicit Unicode code point collation can be used with XPath functions that require collation.-->
-
-   <t:output method="xml" indent="no" encoding="UTF-8"/>
-
-   <t:template match="/">
-
-
-	     <t:text>
-</t:text>
-      <out>
-         <t:text>
-</t:text>
-         <Compare>
-            <t:value-of select="compare('b', 'ä')"/>
-         </Compare>
-         <t:text>
-</t:text>
-         <Contains>
-            <t:value-of select="contains('Strasse', 'ß')"/>
-         </Contains>
-         <t:text>
-</t:text>
-         <Starts-with>
-            <t:value-of select="starts-with('Sstrasse', 'ß')"/>
-         </Starts-with>
-         <t:text>
-</t:text>
-         <Ends-with>
-            <t:value-of select="ends-with('Strass', 'ß')"/>
-         </Ends-with>
-         <t:text>
-</t:text>
-         <Subtring-before>
-            <t:value-of select="substring-before('Strasse', 'raß')"/>
-         </Subtring-before>
-         <t:text>
-</t:text>
-         <Substring-after>
-            <t:value-of select="substring-after('Strasse', 'raß')"/>
-         </Substring-after>
-         <t:text>
-</t:text>
-         <Index-of>
-            <t:value-of select="index-of(('SS', 's', 'sse', 'ss'), 'ß')"/>
-         </Index-of>
-         <t:text>
-</t:text>
-         <Distinct-values>
-            <t:value-of select="distinct-values(('Strasse', 'Straß'))"/>
-         </Distinct-values>
-         <t:text>
-</t:text>
-         <Deep-equal>
-            <t:value-of select="deep-equal('Strasse', 'Straße')"/>
-         </Deep-equal>
-         <t:text>
-</t:text>
-         <Max>
-            <t:value-of select="max(('z', 'ä'))"/>
-         </Max>
-         <t:text>
-</t:text>
-         <Min>
-            <t:value-of select="max(('z', 'ä'))"/>
-         </Min>
-         <t:text>
-</t:text>
-      </out>
-   </t:template>
-</t:transform>
--- a/tests/fn/collation/collation-002.out	Thu Jan 11 17:27:35 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<out>
-<Compare>-1</Compare>
-<Contains>false</Contains>
-<Starts-with>false</Starts-with>
-<Ends-with>false</Ends-with>
-<Subtring-before/>
-<Substring-after/>
-<Index-of/>
-<Distinct-values>Strasse Straß</Distinct-values>
-<Deep-equal>false</Deep-equal>
-<Max>ä</Max>
-<Min>ä</Min>
-</out>
\ No newline at end of file
--- a/tests/fn/collation/collation-002.xsl	Thu Jan 11 17:27:35 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: To verify that the Unicode code point collation can be passed as an argument and is used in XPath functions that require collation.-->
-
-   <t:output method="xml" indent="no" encoding="UTF-8"/>
-
-   <t:template match="/">
-
-
-	     <t:text>
-</t:text>
-      <out>
-         <t:text>
-</t:text>
-         <Compare>
-            <t:value-of select="compare('b', 'ä', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
-         </Compare>
-         <t:text>
-</t:text>
-         <Contains>
-            <t:value-of select="contains('Strasse', 'ß', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
-         </Contains>
-         <t:text>
-</t:text>
-         <Starts-with>
-            <t:value-of select="starts-with('Sstrasse', 'ß', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
-         </Starts-with>
-         <t:text>
-</t:text>
-         <Ends-with>
-            <t:value-of select="ends-with('Strass', 'ß', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
-         </Ends-with>
-         <t:text>
-</t:text>
-         <Subtring-before>
-            <t:value-of select="substring-before('Strasse', 'raß', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
-         </Subtring-before>
-         <t:text>
-</t:text>
-         <Substring-after>
-            <t:value-of select="substring-after('Strasse', 'raß', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
-         </Substring-after>
-         <t:text>
-</t:text>
-         <Index-of>
-            <t:value-of select="index-of(('SS', 's', 'sse', 'ss'), 'ß', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
-         </Index-of>
-         <t:text>
-</t:text>
-         <Distinct-values>
-            <t:value-of select="distinct-values(('Strasse', 'Straß'), 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
-         </Distinct-values>
-         <t:text>
-</t:text>
-         <Deep-equal>
-            <t:value-of select="deep-equal('Strasse', 'Straße', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
-         </Deep-equal>
-         <t:text>
-</t:text>
-         <Max>
-            <t:value-of select="max(('z', 'ä'), 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
-         </Max>
-         <t:text>
-</t:text>
-         <Min>
-            <t:value-of select="max(('z', 'ä'), 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
-         </Min>
-         <t:text>
-</t:text>
-      </out>
-   </t:template>
-</t:transform>
--- a/tests/fn/collation/collation-003.out	Thu Jan 11 17:27:35 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<out>
-<Compare>-1</Compare>
-<Contains>false</Contains>
-<Starts-with>false</Starts-with>
-<Ends-with>false</Ends-with>
-<Subtring-before/>
-<Substring-after/>
-<Index-of/>
-<Distinct-values>Strasse Straß</Distinct-values>
-<Deep-equal>false</Deep-equal>
-<Max>ä</Max>
-<Min>ä</Min>
-</out>
\ No newline at end of file
--- a/tests/fn/collation/collation-003.xsl	Thu Jan 11 17:27:35 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: To verify that the Unicode code point collation URI is the first recognized and used value from a list specified in a default-collation attribute.-->
-
-   <t:output method="xml" indent="no" encoding="UTF-8"/>
-
-   <t:template match="/"
-               default-collation="http://www.none1.org http://www.none2.org http://www.w3.org/2005/xpath-functions/collation/codepoint http://frenchcollation.org">
-
-
-      <t:text>
-</t:text>
-      <out>
-         <t:text>
-</t:text>
-         <Compare>
-            <t:value-of select="compare('b', 'ä')"/>
-         </Compare>
-         <t:text>
-</t:text>
-         <Contains>
-            <t:value-of select="contains('Strasse', 'ß')"/>
-         </Contains>
-         <t:text>
-</t:text>
-         <Starts-with>
-            <t:value-of select="starts-with('Sstrasse', 'ß')"/>
-         </Starts-with>
-         <t:text>
-</t:text>
-         <Ends-with>
-            <t:value-of select="ends-with('Strass', 'ß')"/>
-         </Ends-with>
-         <t:text>
-</t:text>
-         <Subtring-before>
-            <t:value-of select="substring-before('Strasse', 'raß')"/>
-         </Subtring-before>
-         <t:text>
-</t:text>
-         <Substring-after>
-            <t:value-of select="substring-after('Strasse', 'raß')"/>
-         </Substring-after>
-         <t:text>
-</t:text>
-         <Index-of>
-            <t:value-of select="index-of(('SS', 's', 'sse', 'ss'), 'ß')"/>
-         </Index-of>
-         <t:text>
-</t:text>
-         <Distinct-values>
-            <t:value-of select="distinct-values(('Strasse', 'Straß'))"/>
-         </Distinct-values>
-         <t:text>
-</t:text>
-         <Deep-equal>
-            <t:value-of select="deep-equal('Strasse', 'Straße')"/>
-         </Deep-equal>
-         <t:text>
-</t:text>
-         <Max>
-            <t:value-of select="max(('z', 'ä'))"/>
-         </Max>
-         <t:text>
-</t:text>
-         <Min>
-            <t:value-of select="max(('z', 'ä'))"/>
-         </Min>
-         <t:text>
-</t:text>
-      </out>
-   </t:template>
-</t:transform>
--- a/tests/fn/collation/collation-004.xsl	Thu Jan 11 17:27:35 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Testcase to verify that implicit default collation is captured by fn:default-collation -->
-
-   <t:template match="doc">
-      <out>
-         <t:value-of select="default-collation()"/>
-      </out> 
-   </t:template>
-</t:transform>
--- a/tests/fn/collation/collation-005.xsl	Thu Jan 11 17:27:35 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: To verify that the first recognized collation URI value from a list specified in a default-collation attribute is returned by fn:default-collation.-->
-
-   <t:template match="doc"
-               default-collation="http://www.none1.org http://www.none2.org http://www.w3.org/2005/xpath-functions/collation/codepoint http://frenchcollation.org">
-      <out>
-         <t:value-of select="default-collation()"/>
-      </out> 
-   </t:template>
-</t:transform>
--- a/tests/misc/collations/_collations-test-set.xml	Thu Jan 11 17:27:35 2018 +0000
+++ b/tests/misc/collations/_collations-test-set.xml	Thu Jan 11 17:28:30 2018 +0000
@@ -5,35 +5,44 @@
    <description>Tests collations</description>
    <environment name="collations-01">
       <source role="." file="collations-01.xml"/>
-      <collation uri="http://www.w3.org/xslts/collation/caseblind" />
-      <!-- TODO: use "http://www.w3.org/2013/collation/UCA?strength=secondary" -->
+      <collation uri="http://www.w3.org/2013/collation/UCA?strength=secondary" />
    </environment>
    <environment name="collations-02">
       <source role="." file="collations-02.xml"/>
-      <collation uri="http://www.w3.org/xslts/collation/caseblind" />
+      <collation uri="http://www.w3.org/2013/collation/UCA?strength=secondary" />
    </environment>
    <environment name="collations-03">
       <source role="." file="collations-03.xml"/>
-      <collation uri="http://www.w3.org/xslts/collation/caseblind" />
+      <collation uri="http://www.w3.org/2013/collation/UCA?strength=secondary" />
    </environment>
    <environment name="collations-04">
       <source role="." file="collations-04.xml"/>
-      <collation uri="http://www.w3.org/xslts/collation/caseblind" />
+      <collation uri="http://www.w3.org/2013/collation/UCA?strength=secondary" />
    </environment>
    <environment name="collations-05">
       <source role="." file="collations-05.xml"/>
-      <collation uri="http://www.w3.org/xslts/collation/caseblind" />
+      <collation uri="http://www.w3.org/2013/collation/UCA?strength=secondary" />
    </environment>
    <environment name="collations-06">
       <source role=".">
          <content><![CDATA[<names>MacIntosh, MacAndrew, macIntosh, macintoshes, Macintoshes, macintosh, McIntosh, Macintosh</names>]]></content>
       </source>
-      <collation uri="http://www.w3.org/xslts/collation/caseblind" />
+      <collation uri="http://www.w3.org/2013/collation/UCA?strength=secondary" />
    </environment>
+   
+   
+   <environment name="collationfunc001">
+      <source role=".">
+         <content><![CDATA[<!-- A required but useless input XML doc for a transformation -->
+<doc/>]]></content>
+      </source>
+   </environment>
+   
 
    <test-case name="collations-0101">
-      <description>Sort strings using a case-blind collation (see readme.txt)</description>
+      <description>Sort strings using a case-blind collation</description>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Michael Kay" on="2018-01-11" change="Use standard UCA collation URI with secondary strength (for all tests)"/>
       <environment ref="collations-01"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -410,15 +419,21 @@
    <test-case name="collations-0201">
       <description>Testcase to verify that when collation attribute is used with xsl:sort, its value is used to determine the sorting order, and other attributes (lang, case-order) are ignored. Included cases: - no attributes specified; only @lang; only @case-order; both @lang and @case-order</description>
       <created by="Michael Kay" on="2012-10-30"/>
+      <modified by="Michael Kay" on="2018-01-11" change="Eliminate whitespace complications"/>
       <environment ref="collations-02"/>
       <dependencies>
-         <spec value="XSLT10+"/>
+         <spec value="XSLT20+"/>
       </dependencies>
       <test>
          <stylesheet file="collations-0201.xsl"/>
       </test>
       <result>
-         <assert-xml file="collations-0201.out"/>
+         <all-of>
+            <assert>/out/x[1] = "1:22 * 2:18 * 3:20 * 4:12 * 5:14 * 6:11 * 7:9 * 8:15 * 9:1 * 10:6 * 11:19 * 12:5 * 13:13 * 14:17 * 15:16 * 16:2 * 17:4 * 18:21 * 19:3 * 20:8 * 21:10 * 22:7 * "</assert>
+            <assert>/out/x[2] = "1:22 * 2:18 * 3:20 * 4:12 * 5:14 * 6:11 * 7:9 * 8:15 * 9:1 * 10:6 * 11:19 * 12:5 * 13:13 * 14:17 * 15:16 * 16:2 * 17:4 * 18:21 * 19:3 * 20:8 * 21:10 * 22:7 * "</assert>
+            <assert>/out/x[3] = "1:22 * 2:18 * 3:20 * 4:12 * 5:14 * 6:11 * 7:9 * 8:15 * 9:1 * 10:6 * 11:19 * 12:5 * 13:13 * 14:17 * 15:16 * 16:2 * 17:4 * 18:21 * 19:3 * 20:8 * 21:10 * 22:7 * "</assert>
+            <assert>/out/x[4] = "1:22 * 2:18 * 3:20 * 4:12 * 5:14 * 6:11 * 7:9 * 8:15 * 9:1 * 10:6 * 11:19 * 12:5 * 13:13 * 14:17 * 15:16 * 16:2 * 17:4 * 18:21 * 19:3 * 20:8 * 21:10 * 22:7 * "</assert>
+         </all-of>
       </result>
    </test-case>
 
@@ -440,6 +455,7 @@
    <test-case name="collations-0401">
       <description>Test to verify that xsl:key uses the default collation explicitly specified in the stylesheet element when no collation attribute is used</description>
       <created by="Michael Kay" on="2012-10-30"/>
+      <modified by="Michael Kay" on="2018-01-11" change="avoid whitespace complications"/>
       <environment ref="collations-04"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -448,15 +464,14 @@
          <stylesheet file="collations-0401.xsl"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out>
-9 * 
-</out>]]></assert-xml>
+         <assert>/out = '9'</assert>
       </result>
    </test-case>
 
    <test-case name="collations-0402">
       <description>Test to verify that xsl:key uses the explicit collation specified in its collation attribute</description>
       <created by="Michael Kay" on="2012-10-30"/>
+      <modified by="Michael Kay" on="2018-01-11" change="avoid whitespace complications"/>
       <environment ref="collations-04"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -465,15 +480,14 @@
          <stylesheet file="collations-0402.xsl"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out>
-9 * 
-</out>]]></assert-xml>
+         <assert>/out = '9'</assert>
       </result>
    </test-case>
 
    <test-case name="collations-0403">
       <description>Test to verify that xsl:key uses the implicit default collation when no collation attribute is used</description>
       <created by="Michael Kay" on="2012-10-30"/>
+      <modified by="Michael Kay" on="2018-01-11" change="avoid whitespace complications"/>
       <environment ref="collations-04"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -482,9 +496,7 @@
          <stylesheet file="collations-0403.xsl"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out>
-9 * 
-</out>]]></assert-xml>
+         <assert>/out = '9'</assert>
       </result>
    </test-case>
 
@@ -556,4 +568,85 @@
          <assert-xml file="collations-0601.out"/>
       </result>
    </test-case>
+
+   <test-case name="collations-1001">
+      <description>To verify that the implicit Unicode code point collation can be used with XPath functions that require collation.</description>
+      <created by="Michael Kay" on="2012-10-30"/>
+      <modified by="Michael Kay" on="2018-01-11" change="Was collation-001 (under fn)"/>
+      <environment ref="collationfunc001"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="collations-1001.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="collations-1001.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="collations-1002">
+      <description>To verify that the Unicode code point collation can be passed as an argument and is used in XPath functions that require collation.</description>
+      <created by="Michael Kay" on="2012-10-30"/>
+      <modified by="Michael Kay" on="2018-01-11" change="Was collation-002 (under fn)"/>
+      <environment ref="collationfunc001"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="collations-1002.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="collations-1002.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="collations-1003">
+      <description>To verify that the Unicode code point collation URI is the first recognized and used value from a list specified in a default-collation attribute.</description>
+      <created by="Michael Kay" on="2012-10-30"/>
+      <modified by="Michael Kay" on="2018-01-11" change="Was collation-003 (under fn)"/>
+      <environment ref="collationfunc001"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="collations-1003.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="collations-1003.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="collations-1004">
+      <description>Testcase to verify that implicit default collation is captured by fn:default-collation</description>
+      <created by="Michael Kay" on="2012-10-30"/>
+      <modified by="Michael Kay" on="2018-01-11" change="Was collation-004 (under fn)"/>
+      <environment ref="collationfunc001"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="collations-1004.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>http://www.w3.org/2005/xpath-functions/collation/codepoint</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="collations-1005">
+      <description>To verify that the first recognized collation URI value from a list specified in a default-collation attribute is returned by fn:default-collation.</description>
+      <created by="Michael Kay" on="2012-10-30"/>
+      <modified by="Michael Kay" on="2018-01-11" change="Was collation-005 (under fn)"/>
+      <environment ref="collationfunc001"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="collations-1005.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>http://www.w3.org/2005/xpath-functions/collation/codepoint</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
 </test-set>
--- a/tests/misc/collations/collation.dtd	Thu Jan 11 17:27:35 2018 +0000
+++ b/tests/misc/collations/collation.dtd	Thu Jan 11 17:28:30 2018 +0000
@@ -1,1 +1,1 @@
-<!ENTITY coll "http://www.w3.org/xslts/collation/caseblind">
+<!ENTITY coll "http://www.w3.org/2013/collation/UCA?strength=secondary">
--- a/tests/misc/collations/collations-0201.xsl	Thu Jan 11 17:27:35 2018 +0000
+++ b/tests/misc/collations/collations-0201.xsl	Thu Jan 11 17:28:30 2018 +0000
@@ -1,67 +1,53 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Testcase to verify that when collation attribute is used with xsl:sort, its value is used to determine the sorting order, 
+   <!-- Purpose: Testcase to verify that when collation attribute is used with xsl:sort, its value is used to determine the sorting order, 
   				and other attributes (lang, case-order) are ignored. Included cases:
 				- no attributes specified; only @lang; only @case-order;  both @lang and @case-order-->
 
-   <t:template match="/"> 
-      <t:text>
-</t:text>
+   <t:template match="/">
       <out>
-Collation - sort no attributes<t:text>
-</t:text>
-         <t:for-each select="doc/item">
-
-            <t:sort select="@target"
-                    collation="http://www.w3.org/2005/xpath-functions/collation/codepoint"/>
-            <t:value-of select="position()"/>
-            <t:text>:</t:text>
-            <t:value-of select="@num"/>
-            <t:text> * </t:text>
-         </t:for-each>
-         <t:text>
-</t:text>
-Collation - sort with lang attribute<t:text>
-</t:text>
-         <t:for-each select="doc/item">
-
-            <t:sort select="@target"
-                    collation="http://www.w3.org/2005/xpath-functions/collation/codepoint"
-                    lang="sv"/>
-            <t:value-of select="position()"/>
-            <t:text>:</t:text>
-            <t:value-of select="@num"/>
-            <t:text> * </t:text>
-         </t:for-each>
-         <t:text>
-</t:text>
-Collation - sort with case-order attribute<t:text>
-</t:text>
-         <t:for-each select="doc/item">
-
-            <t:sort select="@target"
-                    collation="http://www.w3.org/2005/xpath-functions/collation/codepoint"
-                    case-order="upper-first"/>
-            <t:value-of select="position()"/>
-            <t:text>:</t:text>
-            <t:value-of select="@num"/>
-            <t:text> * </t:text>
-         </t:for-each>
-         <t:text>
-</t:text>
-Collation - sort with lang and case-order attributes<t:text>
-</t:text>
-         <t:for-each select="doc/item">
-
-            <t:sort select="@target"
-                    collation="http://www.w3.org/2005/xpath-functions/collation/codepoint"
-                    lang="sv"
-                    case-order="upper-first"/>
-            <t:value-of select="position()"/>
-            <t:text>:</t:text>
-            <t:value-of select="@num"/>
-            <t:text> * </t:text>
-         </t:for-each>
+         <x desc="Collation - sort no attributes">
+            <t:for-each select="doc/item">
+               <t:sort select="@target"
+                  collation="http://www.w3.org/2005/xpath-functions/collation/codepoint"/>
+               <t:value-of select="position()"/>
+               <t:text>:</t:text>
+               <t:value-of select="@num"/>
+               <t:text> * </t:text>
+            </t:for-each>
+         </x>
+         <x desc="Collation - sort with lang attribute">
+            <t:for-each select="doc/item">
+               <t:sort select="@target"
+                  collation="http://www.w3.org/2005/xpath-functions/collation/codepoint" lang="sv"/>
+               <t:value-of select="position()"/>
+               <t:text>:</t:text>
+               <t:value-of select="@num"/>
+               <t:text> * </t:text>
+            </t:for-each>
+         </x>
+         <x desc="Collation - sort with case-order attribute">
+            <t:for-each select="doc/item">
+               <t:sort select="@target"
+                  collation="http://www.w3.org/2005/xpath-functions/collation/codepoint"
+                  case-order="upper-first"/>
+               <t:value-of select="position()"/>
+               <t:text>:</t:text>
+               <t:value-of select="@num"/>
+               <t:text> * </t:text>
+            </t:for-each>
+         </x>
+         <x desc="Collation - sort with lang and case-order attributes">
+            <t:for-each select="doc/item">
+               <t:sort select="@target"
+                  collation="http://www.w3.org/2005/xpath-functions/collation/codepoint" lang="sv"
+                  case-order="upper-first"/>
+               <t:value-of select="position()"/>
+               <t:text>:</t:text>
+               <t:value-of select="@num"/>
+               <t:text> * </t:text>
+            </t:for-each>
+         </x>
       </out>
    </t:template>
 </t:transform>
--- a/tests/misc/collations/collations-0401.xsl	Thu Jan 11 17:27:35 2018 +0000
+++ b/tests/misc/collations/collations-0401.xsl	Thu Jan 11 17:28:30 2018 +0000
@@ -7,15 +7,8 @@
    <t:key name="key1" match="item" use="@target"/>
 
    <t:template match="/"> 
-      <t:text>
-</t:text>
       <out>
-         <t:text>
-</t:text>
          <t:value-of select="key('key1', 'a')/@num"/>
-         <t:text> * </t:text>
-         <t:text>
-</t:text>
       </out>
    </t:template>
 </t:transform>
--- a/tests/misc/collations/collations-0402.xsl	Thu Jan 11 17:27:35 2018 +0000
+++ b/tests/misc/collations/collations-0402.xsl	Thu Jan 11 17:28:30 2018 +0000
@@ -8,15 +8,8 @@
           collation="http://www.w3.org/2005/xpath-functions/collation/codepoint"/>
 
    <t:template match="/"> 
-      <t:text>
-</t:text>
       <out>
-         <t:text>
-</t:text>
          <t:value-of select="key('key1', 'a')/@num"/>
-         <t:text> * </t:text>
-         <t:text>
-</t:text>
       </out>
    </t:template>
 </t:transform>
--- a/tests/misc/collations/collations-0403.xsl	Thu Jan 11 17:27:35 2018 +0000
+++ b/tests/misc/collations/collations-0403.xsl	Thu Jan 11 17:28:30 2018 +0000
@@ -5,15 +5,8 @@
    <t:key name="key1" match="item" use="@target"/>
 
    <t:template match="/"> 
-      <t:text>
-</t:text>
       <out>
-         <t:text>
-</t:text>
          <t:value-of select="key('key1', 'a')/@num"/>
-         <t:text> * </t:text>
-         <t:text>
-</t:text>
       </out>
    </t:template>
 </t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/collations/collations-1001.out	Thu Jan 11 17:28:30 2018 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<Compare>-1</Compare>
+<Contains>false</Contains>
+<Starts-with>false</Starts-with>
+<Ends-with>false</Ends-with>
+<Subtring-before/>
+<Substring-after/>
+<Index-of/>
+<Distinct-values>Strasse Straß</Distinct-values>
+<Deep-equal>false</Deep-equal>
+<Max>ä</Max>
+<Min>ä</Min>
+</out>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/collations/collations-1001.xsl	Thu Jan 11 17:28:30 2018 +0000
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: To verify that the implicit Unicode code point collation can be used with XPath functions that require collation.-->
+
+   <t:output method="xml" indent="no" encoding="UTF-8"/>
+
+   <t:template match="/">
+
+
+	     <t:text>
+</t:text>
+      <out>
+         <t:text>
+</t:text>
+         <Compare>
+            <t:value-of select="compare('b', 'ä')"/>
+         </Compare>
+         <t:text>
+</t:text>
+         <Contains>
+            <t:value-of select="contains('Strasse', 'ß')"/>
+         </Contains>
+         <t:text>
+</t:text>
+         <Starts-with>
+            <t:value-of select="starts-with('Sstrasse', 'ß')"/>
+         </Starts-with>
+         <t:text>
+</t:text>
+         <Ends-with>
+            <t:value-of select="ends-with('Strass', 'ß')"/>
+         </Ends-with>
+         <t:text>
+</t:text>
+         <Subtring-before>
+            <t:value-of select="substring-before('Strasse', 'raß')"/>
+         </Subtring-before>
+         <t:text>
+</t:text>
+         <Substring-after>
+            <t:value-of select="substring-after('Strasse', 'raß')"/>
+         </Substring-after>
+         <t:text>
+</t:text>
+         <Index-of>
+            <t:value-of select="index-of(('SS', 's', 'sse', 'ss'), 'ß')"/>
+         </Index-of>
+         <t:text>
+</t:text>
+         <Distinct-values>
+            <t:value-of select="distinct-values(('Strasse', 'Straß'))"/>
+         </Distinct-values>
+         <t:text>
+</t:text>
+         <Deep-equal>
+            <t:value-of select="deep-equal('Strasse', 'Straße')"/>
+         </Deep-equal>
+         <t:text>
+</t:text>
+         <Max>
+            <t:value-of select="max(('z', 'ä'))"/>
+         </Max>
+         <t:text>
+</t:text>
+         <Min>
+            <t:value-of select="max(('z', 'ä'))"/>
+         </Min>
+         <t:text>
+</t:text>
+      </out>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/collations/collations-1002.out	Thu Jan 11 17:28:30 2018 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<Compare>-1</Compare>
+<Contains>false</Contains>
+<Starts-with>false</Starts-with>
+<Ends-with>false</Ends-with>
+<Subtring-before/>
+<Substring-after/>
+<Index-of/>
+<Distinct-values>Strasse Straß</Distinct-values>
+<Deep-equal>false</Deep-equal>
+<Max>ä</Max>
+<Min>ä</Min>
+</out>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/collations/collations-1002.xsl	Thu Jan 11 17:28:30 2018 +0000
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: To verify that the Unicode code point collation can be passed as an argument and is used in XPath functions that require collation.-->
+
+   <t:output method="xml" indent="no" encoding="UTF-8"/>
+
+   <t:template match="/">
+
+
+	     <t:text>
+</t:text>
+      <out>
+         <t:text>
+</t:text>
+         <Compare>
+            <t:value-of select="compare('b', 'ä', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
+         </Compare>
+         <t:text>
+</t:text>
+         <Contains>
+            <t:value-of select="contains('Strasse', 'ß', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
+         </Contains>
+         <t:text>
+</t:text>
+         <Starts-with>
+            <t:value-of select="starts-with('Sstrasse', 'ß', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
+         </Starts-with>
+         <t:text>
+</t:text>
+         <Ends-with>
+            <t:value-of select="ends-with('Strass', 'ß', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
+         </Ends-with>
+         <t:text>
+</t:text>
+         <Subtring-before>
+            <t:value-of select="substring-before('Strasse', 'raß', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
+         </Subtring-before>
+         <t:text>
+</t:text>
+         <Substring-after>
+            <t:value-of select="substring-after('Strasse', 'raß', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
+         </Substring-after>
+         <t:text>
+</t:text>
+         <Index-of>
+            <t:value-of select="index-of(('SS', 's', 'sse', 'ss'), 'ß', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
+         </Index-of>
+         <t:text>
+</t:text>
+         <Distinct-values>
+            <t:value-of select="distinct-values(('Strasse', 'Straß'), 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
+         </Distinct-values>
+         <t:text>
+</t:text>
+         <Deep-equal>
+            <t:value-of select="deep-equal('Strasse', 'Straße', 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
+         </Deep-equal>
+         <t:text>
+</t:text>
+         <Max>
+            <t:value-of select="max(('z', 'ä'), 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
+         </Max>
+         <t:text>
+</t:text>
+         <Min>
+            <t:value-of select="max(('z', 'ä'), 'http://www.w3.org/2005/xpath-functions/collation/codepoint')"/>
+         </Min>
+         <t:text>
+</t:text>
+      </out>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/collations/collations-1003.out	Thu Jan 11 17:28:30 2018 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<out>
+<Compare>-1</Compare>
+<Contains>false</Contains>
+<Starts-with>false</Starts-with>
+<Ends-with>false</Ends-with>
+<Subtring-before/>
+<Substring-after/>
+<Index-of/>
+<Distinct-values>Strasse Straß</Distinct-values>
+<Deep-equal>false</Deep-equal>
+<Max>ä</Max>
+<Min>ä</Min>
+</out>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/collations/collations-1003.xsl	Thu Jan 11 17:28:30 2018 +0000
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: To verify that the Unicode code point collation URI is the first recognized and used value from a list specified in a default-collation attribute.-->
+
+   <t:output method="xml" indent="no" encoding="UTF-8"/>
+
+   <t:template match="/"
+               default-collation="http://www.none1.org http://www.none2.org http://www.w3.org/2005/xpath-functions/collation/codepoint http://frenchcollation.org">
+
+
+      <t:text>
+</t:text>
+      <out>
+         <t:text>
+</t:text>
+         <Compare>
+            <t:value-of select="compare('b', 'ä')"/>
+         </Compare>
+         <t:text>
+</t:text>
+         <Contains>
+            <t:value-of select="contains('Strasse', 'ß')"/>
+         </Contains>
+         <t:text>
+</t:text>
+         <Starts-with>
+            <t:value-of select="starts-with('Sstrasse', 'ß')"/>
+         </Starts-with>
+         <t:text>
+</t:text>
+         <Ends-with>
+            <t:value-of select="ends-with('Strass', 'ß')"/>
+         </Ends-with>
+         <t:text>
+</t:text>
+         <Subtring-before>
+            <t:value-of select="substring-before('Strasse', 'raß')"/>
+         </Subtring-before>
+         <t:text>
+</t:text>
+         <Substring-after>
+            <t:value-of select="substring-after('Strasse', 'raß')"/>
+         </Substring-after>
+         <t:text>
+</t:text>
+         <Index-of>
+            <t:value-of select="index-of(('SS', 's', 'sse', 'ss'), 'ß')"/>
+         </Index-of>
+         <t:text>
+</t:text>
+         <Distinct-values>
+            <t:value-of select="distinct-values(('Strasse', 'Straß'))"/>
+         </Distinct-values>
+         <t:text>
+</t:text>
+         <Deep-equal>
+            <t:value-of select="deep-equal('Strasse', 'Straße')"/>
+         </Deep-equal>
+         <t:text>
+</t:text>
+         <Max>
+            <t:value-of select="max(('z', 'ä'))"/>
+         </Max>
+         <t:text>
+</t:text>
+         <Min>
+            <t:value-of select="max(('z', 'ä'))"/>
+         </Min>
+         <t:text>
+</t:text>
+      </out>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/collations/collations-1004.xsl	Thu Jan 11 17:28:30 2018 +0000
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Testcase to verify that implicit default collation is captured by fn:default-collation -->
+
+   <t:template match="doc">
+      <out>
+         <t:value-of select="default-collation()"/>
+      </out> 
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/collations/collations-1005.xsl	Thu Jan 11 17:28:30 2018 +0000
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: To verify that the first recognized collation URI value from a list specified in a default-collation attribute is returned by fn:default-collation.-->
+
+   <t:template match="doc"
+               default-collation="http://www.none1.org http://www.none2.org http://www.w3.org/2005/xpath-functions/collation/codepoint http://frenchcollation.org">
+      <out>
+         <t:value-of select="default-collation()"/>
+      </out> 
+   </t:template>
+</t:transform>