Test case challenged by bug 30221
authorMichael Kay <mike@saxonica.com>
Wed, 13 Jun 2018 12:38:17 +0100
changeset 1857 be6098d1034a
parent 1856 067c1e8d801d
child 1858 bb19aebf3958
Test case challenged by bug 30221
tests/misc/error/_error-test-set.xml
tests/misc/error/error-0640m.xsl
--- a/tests/misc/error/_error-test-set.xml	Wed Jun 13 12:37:24 2018 +0100
+++ b/tests/misc/error/_error-test-set.xml	Wed Jun 13 12:38:17 2018 +0100
@@ -1620,7 +1620,9 @@
       </result>
    </test-case>
    
-   <test-case name="error-0045b">
+   <!-- Test case deleted: see bug 30221 for rationale -->
+   
+   <!--<test-case name="error-0045b">
       <description>Tests the following error with a default-mode attribute on xsl:stylesheet to a non-existing value
          
          Error: It is a non-recoverable dynamic
@@ -1628,7 +1630,7 @@
                         expanded QName in the
                         mode attribute of any template defined in the stylesheet.</description>
       <created by="Abel Braaksma" on="2014-10-21"/>
-      <!-- Challenged by bug 30221 -->
+      <!-\- Challenged by bug 30221 -\->
       <environment ref="error001a"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -1640,7 +1642,7 @@
       <result>
          <error code="XTDE0045"/>
       </result>
-   </test-case>
+   </test-case>-->
    
    <test-case name="error-0045ba">
       <description>Tests the following error with a default-mode attribute on xsl:stylesheet to a non-existing value
@@ -4709,6 +4711,8 @@
          Generate error XTDE0640 (circularity error) and trying to catch it with xsl:try/catch (not allowed, see Bug 28368)
       </description>
       <created by="Abel Braaksma" on="2015-03-30"/>
+      <modified by="Michael Kay" on="2018-05-22" 
+         change="The final spec says that the outcome of catching XTDE0640 is implementation-defined"/>
       <dependencies>
          <spec value="XSLT30+"/>
       </dependencies>
@@ -4716,7 +4720,10 @@
          <stylesheet file="error-0640m.xsl"/>
       </test>
       <result>
-         <error code="XTDE0640"/>
+         <any-of>
+            <error code="XTDE0640"/>
+            <assert>exists(/out/@wrong)</assert>
+         </any-of>
       </result>
    </test-case>
 
--- a/tests/misc/error/error-0640m.xsl	Wed Jun 13 12:37:24 2018 +0100
+++ b/tests/misc/error/error-0640m.xsl	Wed Jun 13 12:38:17 2018 +0100
@@ -7,6 +7,14 @@
 
 <!-- Test circular reference, trying to catch the error XPDE0640
     See bug 28368 about capturing circularity errors (will likely become disallowed) -->
+    
+    <!-- What the spec actually says is: 
+        
+        Although a circularity is detected as a dynamic error, there is no unique instruction whose 
+        evaluation triggers the error condition, and the result of any attempt to catch the error using 
+        an xsl:try instruction is therefore implementation-dependent.
+        
+    -->    
  
   <xsl:variable name="circular">
       <xsl:try>