Bug#28348, fixing Saxon-specific error, making test streamable (xsl:try is now allowed)
authorabraaksm
Thu, 26 Mar 2015 22:11:51 +0100
changeset 868 730b58224dc5
parent 863 8a52ecfb8ae0
child 869 236d5a65cb94
Bug#28348, fixing Saxon-specific error, making test streamable (xsl:try is now allowed)
tests/attr/mode/_mode-test-set.xml
tests/attr/mode/mode-1426.xsl
--- a/tests/attr/mode/_mode-test-set.xml	Thu Mar 26 13:43:07 2015 +0100
+++ b/tests/attr/mode/_mode-test-set.xml	Thu Mar 26 22:11:51 2015 +0100
@@ -1361,6 +1361,7 @@
       <description>Test xsl:mode on-no-match=fail, failure occurs but is caught; streaming</description>
       <keywords>xsl:mode on-no-match-attribute streamable fail xsl:try xsl:catch XTDE0555</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Abel Braaksma" on="2015-03-23"/>
       <environment ref="mode-14s"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -1370,7 +1371,7 @@
          <stylesheet file="mode-1426.xsl"/>
       </test>
       <result>
-         <error code="SXST0060"/>
+         <assert>count(/book/chapter/v/c[. = 'error XTDE055 caught']) = 56</assert>
       </result>
    </test-case>
 
--- a/tests/attr/mode/mode-1426.xsl	Thu Mar 26 13:43:07 2015 +0100
+++ b/tests/attr/mode/mode-1426.xsl	Thu Mar 26 22:11:51 2015 +0100
@@ -1,37 +1,39 @@
 <?xml version="1.0"?> 
 
 <!-- mode-onnomatch016s -->
-<!-- Michael Kay -->
-<!-- on-no-match=fail, failure case, with streaming; the error is caught, or would be if it were allowed when streaming --> 
+<!-- Michael Kay / mod. by ABr-->
+<!-- on-no-match=fail, failure case, with streaming; the error is caught, and reported back with a motionless construct --> 
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
-  xmlns:xs="http://www.w3.org/2001/XMLSchema"
-  exclude-result-prefixes="xs">
+    xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
 
-  <xsl:mode on-no-match="fail" streamable="yes"/>
-  
-  <xsl:template match="/">
-    <xsl:apply-templates/>
-  </xsl:template>
-  
-  <xsl:template match="*">
-    <xsl:copy><xsl:apply-templates/></xsl:copy>
-  </xsl:template>
-  
-  <xsl:template match="text()[not(parent::v)]">
-    <xsl:value-of select="."/>
-  </xsl:template>
-  
-  <xsl:template match="v">
-    <xsl:copy>
-      <xsl:try>
-        <xsl:apply-templates/>
-        <xsl:catch errors="err:XTDE0555" xmlns:err="http://www.w3.org/2005/xqt-errors" exclude-result-prefixes="err">
-          <z><xsl:value-of select="."/></z>
-        </xsl:catch>
-      </xsl:try>
-    </xsl:copy>
-  </xsl:template>
-  
-    
-</xsl:stylesheet>
\ No newline at end of file
+    <xsl:mode on-no-match="fail" streamable="yes" />
+
+    <xsl:template match="/">
+        <xsl:apply-templates />
+    </xsl:template>
+
+    <xsl:template match="*">
+        <xsl:copy>
+            <xsl:apply-templates />
+        </xsl:copy>
+    </xsl:template>
+
+    <xsl:template match="text()[not(parent::v)]">
+        <xsl:value-of select="." />
+    </xsl:template>
+
+    <xsl:template match="v">
+        <xsl:copy>
+            <xsl:try>
+                <xsl:apply-templates />
+                <xsl:catch errors="err:XTDE0555" xmlns:err="http://www.w3.org/2005/xqt-errors"
+                    exclude-result-prefixes="err">
+                    <c>error XTDE055 caught</c>
+                </xsl:catch>
+            </xsl:try>
+        </xsl:copy>
+    </xsl:template>
+
+
+</xsl:stylesheet>