commit merge
authorMichael Kay <mike@saxonica.com>
Wed, 10 Sep 2014 22:58:06 +0100
changeset 666 61cfc47b4de6
parent 665 228c7f33d842 (current diff)
parent 663 9d79b663e7fd (diff)
child 667 33a47b04b02f
commit merge
tests/attr/streamable/_streamable-test-set.xml
--- a/admin/catalog-schema.xsd	Wed Sep 10 22:53:48 2014 +0100
+++ b/admin/catalog-schema.xsd	Wed Sep 10 22:58:06 2014 +0100
@@ -120,6 +120,7 @@
                 <xs:element ref="collection"/>
                 <xs:element ref="collation"/>
                 <xs:element ref="stylesheet"/>
+                <xs:element ref="output"/>
             </xs:choice>
         </xs:sequence>
     </xs:group>
@@ -1296,15 +1297,15 @@
         <xs:annotation>
             <xs:documentation>
                 <p>Gives the name of the mode to be used as the entry point for the transformation,
-                    with possible parameters. </p><p>To transmit parameters in the default mode, set
-                    mode to <code>#default</code>. </p>
+                    with possible parameters. </p><p>To transmit parameters for an invocation in the
+                    stylesheet's default mode, leave out the name attribute.</p>
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
             <xs:sequence>
                 <xs:group ref="tunnelParameters"/>
             </xs:sequence>
-            <xs:attribute name="name" type="xs:QName"/>
+            <xs:attribute name="name" type="xs:QName" use="optional"/>
         </xs:complexType>
     </xs:element>
 
@@ -1746,153 +1747,137 @@
         </xs:complexType>
     </xs:element>
 
-<!-- NEW -->
-    <xs:element name="assert-eq"  substitutionGroup="abstractAssertion">
+    <!-- NEW -->
+    <xs:element name="assert-eq" substitutionGroup="abstractAssertion">
         <xs:annotation>
             <xs:documentation>
                 <div>
                     <h3>assert-eq</h3>
-                    <p>
-                        The assert element contains an XPath expression (usually a simple string or numeric literal) which must
-                        be equal to the result of the test case under the rules of the XPath 'eq' operator. 
-                    </p>
-                    <p>For example, <code>&lt;assert-eq&gt;12&lt;/assert-eq&gt;</code>
-                        asserts that the result of the test expression is an atomic value that compares
-                        equal to the integer 12 (which means it might be the double value 12.0 or the
-                        float value 12.0 or the untyped atomic value "12.0", for example).</p>
-                </div> 
-            </xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:simpleContent>
-                <xs:extension base="xs:string" />
-            </xs:simpleContent>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="assert-count"  substitutionGroup="abstractAssertion">
-        <xs:annotation>
-            <xs:documentation>
-                <div>
-                    <h3>assert-count</h3>
-                    <p>
-                        Asserts that the result must be a sequence containing a given number of items.
-                        The value of the element is an integer giving the expected length of the sequence.
-                    </p>
-                </div> 
-            </xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:simpleContent>
-                <xs:extension base="xs:integer" />
-            </xs:simpleContent>
-        </xs:complexType>
-    </xs:element>
-    
-    <xs:element name="assert-deep-eq"  substitutionGroup="abstractAssertion">
-        <xs:annotation>
-            <xs:documentation>
-                <div>
-                    <h3>assert-deep-eq</h3>
-                    <p>
-                        Asserts that the result must be a sequence of atomic values that is deep-equal
-                        to the supplied sequence under the rules of the deep-equal() function.
-                    </p>
-                </div> 
+                    <p> The assert element contains an XPath expression (usually a simple string or
+                        numeric literal) which must be equal to the result of the test case under
+                        the rules of the XPath 'eq' operator. </p>
+                    <p>For example, <code>&lt;assert-eq&gt;12&lt;/assert-eq&gt;</code> asserts that
+                        the result of the test expression is an atomic value that compares equal to
+                        the integer 12 (which means it might be the double value 12.0 or the float
+                        value 12.0 or the untyped atomic value "12.0", for example).</p>
+                </div>
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
             <xs:simpleContent>
-                <xs:extension base="xs:string" />
+                <xs:extension base="xs:string"/>
             </xs:simpleContent>
         </xs:complexType>
     </xs:element>
-    
-    <xs:element name="assert-permutation"  substitutionGroup="abstractAssertion">
+
+    <xs:element name="assert-count" substitutionGroup="abstractAssertion">
+        <xs:annotation>
+            <xs:documentation>
+                <div>
+                    <h3>assert-count</h3>
+                    <p> Asserts that the result must be a sequence containing a given number of
+                        items. The value of the element is an integer giving the expected length of
+                        the sequence. </p>
+                </div>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:simpleContent>
+                <xs:extension base="xs:integer"/>
+            </xs:simpleContent>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="assert-deep-eq" substitutionGroup="abstractAssertion">
+        <xs:annotation>
+            <xs:documentation>
+                <div>
+                    <h3>assert-deep-eq</h3>
+                    <p> Asserts that the result must be a sequence of atomic values that is
+                        deep-equal to the supplied sequence under the rules of the deep-equal()
+                        function. </p>
+                </div>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:simpleContent>
+                <xs:extension base="xs:string"/>
+            </xs:simpleContent>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="assert-permutation" substitutionGroup="abstractAssertion">
         <xs:annotation>
             <xs:documentation>
                 <div>
                     <h3>assert-permutation</h3>
-                    <p>
-                        Asserts that the result must be a sequence of atomic values that 
-                        has some permutation (reordering) that is deep-equal
-                        to the supplied sequence under the rules of the deep-equal() function.
-                    </p>
-                    
-                    <p>Note this implies that NaN is equal to NaN.</p>
-                </div> 
+                    <p> Asserts that the result must be a sequence of atomic values that has some
+                        permutation (reordering) that is deep-equal to the supplied sequence under
+                        the rules of the deep-equal() function. </p> <p>Note this implies that NaN
+                        is equal to NaN.</p>
+                </div>
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
             <xs:simpleContent>
-                <xs:extension base="xs:string" />
+                <xs:extension base="xs:string"/>
             </xs:simpleContent>
         </xs:complexType>
     </xs:element>
-    
-    
-    <xs:element name="assert-empty"  substitutionGroup="abstractAssertion">
+
+
+    <xs:element name="assert-empty" substitutionGroup="abstractAssertion">
         <xs:annotation>
             <xs:documentation>
                 <div>
                     <h3>assert-empty</h3>
-                    <p>
-                        Asserts that the result of the test is an empty sequence.
-                    </p>
-                </div> 
+                    <p> Asserts that the result of the test is an empty sequence. </p>
+                </div>
             </xs:documentation>
         </xs:annotation>
     </xs:element>
-    
-    <xs:element name="assert-true"  substitutionGroup="abstractAssertion">
+
+    <xs:element name="assert-true" substitutionGroup="abstractAssertion">
         <xs:annotation>
             <xs:documentation>
                 <div>
                     <h3>assert-true</h3>
-                    <p>
-                        Asserts that the result of the test is the singleton boolean value true().
-                        Note, the test expression must actually evaluate to true: this is not an assertion
-                        on the effective boolean value.
-                    </p>
-                </div> 
+                    <p> Asserts that the result of the test is the singleton boolean value true().
+                        Note, the test expression must actually evaluate to true: this is not an
+                        assertion on the effective boolean value. </p>
+                </div>
             </xs:documentation>
         </xs:annotation>
     </xs:element>
-    
-    <xs:element name="assert-false"  substitutionGroup="abstractAssertion">
+
+    <xs:element name="assert-false" substitutionGroup="abstractAssertion">
         <xs:annotation>
             <xs:documentation>
                 <div>
                     <h3>assert-true</h3>
-                    <p>
-                        Asserts that the result of the test is the singleton boolean value false().
-                        Note, the test expression must actually evaluate to false: this is not an assertion
-                        on the effective boolean value.
-                    </p>
-                </div> 
+                    <p> Asserts that the result of the test is the singleton boolean value false().
+                        Note, the test expression must actually evaluate to false: this is not an
+                        assertion on the effective boolean value. </p>
+                </div>
             </xs:documentation>
         </xs:annotation>
     </xs:element>
-    
+
     <xs:element name="assert-string-value" substitutionGroup="abstractAssertion">
         <xs:annotation>
             <xs:documentation>
                 <div>
                     <h3>assert-string-value</h3>
-                    <p>
-                        Asserts that the result of the test, after conversion to a string by applying the expression
-                        
-                        string-join(for $r in $result return string($r), " ")
-                        
-                        is equal to the string value of the assert-string-value element. Note that this test cannot
-                        be used if the result includes items that do not have a string value (elements with element-only
-                        content; function items)
-                        
-                        If the normalize-space attribute is present with the value true, then both the string value of the query
-                        result and the value of the assert-string-value
-                        element should be processed as if by the XPath normalize-space() function before the comparison.
-                    </p>
-                </div> 
+                    <p> Asserts that the result of the test, after conversion to a string by
+                        applying the expression string-join(for $r in $result return string($r), "
+                        ") is equal to the string value of the assert-string-value element. Note
+                        that this test cannot be used if the result includes items that do not have
+                        a string value (elements with element-only content; function items) If the
+                        normalize-space attribute is present with the value true, then both the
+                        string value of the query result and the value of the assert-string-value
+                        element should be processed as if by the XPath normalize-space() function
+                        before the comparison. </p>
+                </div>
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -1902,10 +1887,10 @@
                 </xs:extension>
             </xs:simpleContent>
         </xs:complexType>
-        
+
     </xs:element>
 
-<!-- END -->
+    <!-- END -->
 
     <xs:element name="error" substitutionGroup="abstractAssertion">
         <xs:annotation>
--- a/tests/attr/streamable/_streamable-test-set.xml	Wed Sep 10 22:53:48 2014 +0100
+++ b/tests/attr/streamable/_streamable-test-set.xml	Wed Sep 10 22:58:06 2014 +0100
@@ -2076,7 +2076,7 @@
          expression</description>
       <keywords>fn:max AxisStep positional-predicate climbing-childless xsl:import-schema</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
-      <modified by="Michael Kay" on="2014-09-10" change="remove initial-mode"/>
+      <modified by="John Lumley" on="2014-09-05" change="Removed initial-mode"/>
       <environment ref="grouped-transactions"/>
       <dependencies>
          <feature value="schema_aware"/>
@@ -2085,6 +2085,7 @@
       <test>
          <stylesheet file="streamable-104.xsl"/>
          <initial-template name="main"/>
+        <!-- <initial-mode name="s"/>-->
       </test>
       <result>
          <assert-xml><![CDATA[<out><max date="2006-02-13">13.24</max></out>]]></assert-xml>
@@ -2097,7 +2098,7 @@
       <keywords>_IMPROVE:fix-description AxisStep fn:position GeneralComp xsl:if
          xsl:import-schema</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
-      <modified by="Michael Kay" on="2014-09-10" change="remove initial-mode"/>
+      <modified by="John Lumley" on="2014-09-05" change="Removed initial-mode"/>
       <environment ref="loans"/>
       <dependencies>
          <feature value="schema_aware"/>
@@ -2106,6 +2107,7 @@
       <test>
          <stylesheet file="streamable-105.xsl"/>
          <initial-template name="main"/>
+         <!--<initial-mode name="s"/>-->
       </test>
       <result>
          <all-of>
--- a/tests/decl/character-map/_character-map-test-set.xml	Wed Sep 10 22:53:48 2014 +0100
+++ b/tests/decl/character-map/_character-map-test-set.xml	Wed Sep 10 22:58:06 2014 +0100
@@ -275,10 +275,8 @@
       </test>
       <result>
          <all-of>
-            <serialization-matches>&lt;body&gt;value='&lt;%= "id" \+ idValue
-               %&gt;'</serialization-matches>
-            <serialization-matches>&lt;setProperty value=['"]&lt;%= "id" \+ idValue
-               %&gt;['"]</serialization-matches>
+            <serialization-matches>&lt;body&gt;value='&lt;%= "id" \+ idValue %&gt;'</serialization-matches>
+            <serialization-matches>&lt;setProperty value=['"]&lt;%= "id" \+ idValue %&gt;['"]</serialization-matches>
          </all-of>
       </result>
    </test-case>
@@ -356,10 +354,8 @@
       </test>
       <result>
          <all-of>
-            <serialization-matches>content=["']te\[X\]t/html;
-               \[C\]harset=UTF-8['"]</serialization-matches>
-            <serialization-matches>The qui\[C\]k brown fo\[X\] jumped over the lazy
-               dog</serialization-matches>
+            <serialization-matches>content=["']te\[X\]t/html; \[C\]harset=UTF-8['"]</serialization-matches>
+            <serialization-matches>The qui\[C\]k brown fo\[X\] jumped over the lazy dog</serialization-matches>
          </all-of>
       </result>
    </test-case>
--- a/tests/expr/higher-order-functions/higher-order-functions-068.xsl	Wed Sep 10 22:53:48 2014 +0100
+++ b/tests/expr/higher-order-functions/higher-order-functions-068.xsl	Wed Sep 10 22:58:06 2014 +0100
@@ -26,7 +26,7 @@
                  return f:fib($n - 1, $first)" />
     </xsl:function>
 
-    <xsl:template match="/">
+    <xsl:template name="main">
         <out><xsl:value-of select="f:fib(11, function($a) {$a})" /></out>
     </xsl:template>
     
--- a/tests/fn/normalize-unicode/_normalize-unicode-test-set.xml	Wed Sep 10 22:53:48 2014 +0100
+++ b/tests/fn/normalize-unicode/_normalize-unicode-test-set.xml	Wed Sep 10 22:58:06 2014 +0100
@@ -301,10 +301,8 @@
          <all-of>
             <serialization-matches><![CDATA[<p class="en">The quick brown fox</p>]]></serialization-matches>
             <serialization-matches>Straßenu&#x308;berfu&#x308;hrung</serialization-matches>
-            <serialization-matches>&lt;p class="de"&gt;&lt;span
-               class="u&#x308;ss"&gt;u&#x308;ß&lt;/span&gt;Straßenu&#x308;berfu&#x308;hrung</serialization-matches>
-            <serialization-matches>&lt;p class="de"&gt;&lt;span
-               class="u&#x308;ss"&gt;u&#x308;ss&lt;/span&gt;Straßenu&#x308;berfu&#x308;hrung</serialization-matches>
+            <serialization-matches>&lt;p class="de"&gt;&lt;span class="u&#x308;ss"&gt;u&#x308;ß&lt;/span&gt;Straßenu&#x308;berfu&#x308;hrung</serialization-matches>
+            <serialization-matches>&lt;p class="de"&gt;&lt;span class="u&#x308;ss"&gt;u&#x308;ss&lt;/span&gt;Straßenu&#x308;berfu&#x308;hrung</serialization-matches>
             <serialization-matches><![CDATA[<p class="ffi"><span class="ffi">ffi</span>Affinity]]></serialization-matches>
          </all-of>
       </result>
@@ -327,10 +325,8 @@
          <all-of>
             <serialization-matches><![CDATA[<p>The quick brown fox</p>]]></serialization-matches>
             <serialization-matches>Straßenu&amp;#x308;berfu&amp;#x308;hrung</serialization-matches>
-            <serialization-matches>&lt;p norm="c"
-               üss="u&amp;#x308;ß">Straßenu&amp;#x308;berfu&amp;#x308;hrung</serialization-matches>
-            <serialization-matches>&lt;p norm="d"
-               üss="u&amp;#x308;ss">Straßenu&amp;#x308;berfu&amp;#x308;hrung</serialization-matches>
+            <serialization-matches>&lt;p norm="c" üss="u&amp;#x308;ß">Straßenu&amp;#x308;berfu&amp;#x308;hrung</serialization-matches>
+            <serialization-matches>&lt;p norm="d" üss="u&amp;#x308;ss">Straßenu&amp;#x308;berfu&amp;#x308;hrung</serialization-matches>
             <serialization-matches><![CDATA[<p norm="kc" ffi="ffi">Affinity]]></serialization-matches>
          </all-of>
       </result>
@@ -369,12 +365,12 @@
       </dependencies>
       <test>
          <stylesheet file="normalize-unicode-017.xsl"/>
-         <output serialize="yes"/>
+         <!--<output serialize="yes"/>-->
       </test>
       <result>
          <!-- TODO: should be a serialization test -->
-         <!--<assert-xml file="normalize-unicode-017.out"/>-->
-         <assert-serialization file="normalize-unicode-018.out"/>
+         <assert-xml file="normalize-unicode-017.out"/>
+         <!--<assert-serialization file="normalize-unicode-018.out"/>-->
       </result>
    </test-case>
 
@@ -388,12 +384,12 @@
       </dependencies>
       <test>
          <stylesheet file="normalize-unicode-018.xsl"/>
-         <output serialize="yes"/>
+         <!--<output serialize="yes"/>-->
       </test>
       <result>
          <!-- TODO: should be a serialization test -->
-         <!--<assert-xml file="normalize-unicode-018.out"/>-->
-         <assert-serialization file="normalize-unicode-018.out"/>
+         <assert-xml file="normalize-unicode-018.out"/>
+         <!--<assert-serialization file="normalize-unicode-018.out"/>-->
       </result>
    </test-case>
 </test-set>
--- a/tests/insn/for-each-group/_for-each-group-test-set.xml	Wed Sep 10 22:53:48 2014 +0100
+++ b/tests/insn/for-each-group/_for-each-group-test-set.xml	Wed Sep 10 22:58:06 2014 +0100
@@ -140,13 +140,31 @@
       </result>
    </test-case>
    
+   <test-case name="for-each-group-002a">
+      <description>Error case: bind-group and bind-grouping-key variables no longer permitted</description>
+      <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Michael Kay" on="2014-04-07" change="turn this into an error case (spec has changed)"/>
+      <modified by="Tim Mills" on="2014-09-05" change="Correct error code for XSLT20.  See bug 25305"/>
+      <environment ref="group001"/>
+      <dependencies>
+         <spec value="XSLT20"/>
+      </dependencies>
+      <test>
+         <stylesheet file="for-each-group-002.xsl"/>
+      </test>
+      <result>
+         <error code="XPST0008"/>
+      </result>
+   </test-case>
+
    <test-case name="for-each-group-002">
       <description>Error case: bind-group and bind-grouping-key variables no longer permitted</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <modified by="Michael Kay" on="2014-04-07" change="turn this into an error case (spec has changed)"/>
+      <modified by="Tim Mills" on="2014-09-05" change="Marked as XSLT30+.  See bug 25305"/>
       <environment ref="group001"/>
       <dependencies>
-         <spec value="XSLT20+"/>
+         <spec value="XSLT30+"/>
       </dependencies>
       <test>
          <stylesheet file="for-each-group-002.xsl"/>
--- a/tests/insn/result-document/_result-document-test-set.xml	Wed Sep 10 22:53:48 2014 +0100
+++ b/tests/insn/result-document/_result-document-test-set.xml	Wed Sep 10 22:58:06 2014 +0100
@@ -431,8 +431,8 @@
    <test-case name="result-document-0219">
       <description>Test with xsl:result-document and @doctype-system, @method is xml.</description>
       <created by="Michael Kay" on="2012-10-30"/>
-      <environment ref="result-document-02"/>
       <modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
+      <environment ref="result-document-02"/>      
       <dependencies>
          <spec value="XSLT20+"/>
       </dependencies>
--- a/tests/misc/error/_error-test-set.xml	Wed Sep 10 22:53:48 2014 +0100
+++ b/tests/misc/error/_error-test-set.xml	Wed Sep 10 22:58:06 2014 +0100
@@ -1447,12 +1447,14 @@
                         stylesheet function defined in the stylesheet,
                      whose visibility is public or final.</description>
       <created by="Michael Kay" on="2014-08-25"/>
+      <modified by="John Lumley" on="2014-09-05" change="Use initial-function"/>
       <dependencies>
          <spec value="XSLT30+"/>
       </dependencies>
       <test>
          <stylesheet file="error-0041a.xsl"/>
-         <initial-template name="main"/>
+         <!--<initial-template name="main"/>-->
+         <initial-function xmlns:hms="Nonesuch" name="hms:noSuchFunction"/>
       </test>
       <result>
          <error code="XTDE0041"/>
@@ -1465,12 +1467,13 @@
                                  is supplied (either explicitly, or
                         defaulted to the global context item).</description>
       <created by="Michael Kay" on="2014-08-25"/>
+      <modified by="John Lumley" on="2014-09-05" change="Use initial (unnamed) mode"/>
       <dependencies>
          <spec value="XSLT30+"/>
       </dependencies>
       <test>
          <stylesheet file="error-0044a.xsl"/>
-         <initial-template name="main"/>
+         <initial-mode/>
       </test>
       <result>
          <error code="XTDE0044"/>
@@ -7209,12 +7212,14 @@
    <test-case name="error-1310e-30">
       <description>Generate error FODF1310 (3.0). Was error-code-357.</description>
       <created by="Michael Kay" on="2012-11-07"/>
-      <environment ref="error001"/>
-      <dependencies>
-         <spec value="XSLT30+"/>
-      </dependencies>
-      <test>
-         <stylesheet file="error-code-357.xsl"/>
+      <modified by="John Lumley" on="2014-09-05" change="Corrected stsylesheet reference"/>
+      <environment ref="error001"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <!--<stylesheet file="error-code-357.xsl"/>-->
+         <stylesheet file="error-1310e.xsl"/>
          <initial-template name="main"/>
       </test>
       <result>
--- a/tests/misc/error/error-0044a.xsl	Wed Sep 10 22:53:48 2014 +0100
+++ b/tests/misc/error/error-0044a.xsl	Wed Sep 10 22:58:06 2014 +0100
@@ -7,7 +7,7 @@
                         defaulted to the global context item).
                     -->
                     
-   <xsl:template name="main">
+   <xsl:template match="/" mode="aMode">
       <out>
          <x/>
       </out>