Almost entirely cosmetic changes to tunnel param tests
authorMichael Kay <mike@saxonica.com>
Thu, 04 Feb 2016 17:14:14 +0000
changeset 1230 09a187dec956
parent 1217 fe8e1b0da194
child 1231 a4430430ffa2
Almost entirely cosmetic changes to tunnel param tests
tests/attr/tunnel/_tunnel-test-set.xml
tests/attr/tunnel/tunnel-0104.xsl
tests/attr/tunnel/tunnel-0106.xsl
tests/attr/tunnel/tunnel-0111.xsl
tests/attr/tunnel/tunnel-0208.xsl
tests/attr/tunnel/tunnel-0209.xsl
tests/attr/tunnel/tunnel-0210.xsl
tests/attr/tunnel/tunnel-0214.xsl
tests/attr/tunnel/tunnel-0216.xsl
tests/attr/tunnel/tunnel-0227.xsl
tests/attr/tunnel/tunnel-0406.xsl
--- a/tests/attr/tunnel/_tunnel-test-set.xml	Mon Jan 25 14:50:25 2016 +0000
+++ b/tests/attr/tunnel/_tunnel-test-set.xml	Thu Feb 04 17:14:14 2016 +0000
@@ -912,6 +912,7 @@
    <test-case name="tunnel-0406">
       <description>Test case where the intial template launches on an element other than root. Initially the template gets invoked and does not have any tunnel parameters. Further processing would invoke another template which is aimed to be called on the same initial node and passes some tunnel parameters to it.</description>
       <created by="Michael Kay" on="2012-10-30"/>
+      <modified by="Michael Kay" on="2016-01-28" change="produce well-formed result document"/>
       <environment ref="tunnel-04"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -920,7 +921,7 @@
          <stylesheet file="tunnel-0406.xsl"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out>Parameter foo is: default_value</out><out>Parameter foo is: passed_value</out>]]></assert-xml>
+         <assert-xml><![CDATA[<doc><out>Parameter foo is: default_value</out><out>Parameter foo is: passed_value</out></doc>]]></assert-xml>
       </result>
    </test-case>
 
--- a/tests/attr/tunnel/tunnel-0104.xsl	Mon Jan 25 14:50:25 2016 +0000
+++ b/tests/attr/tunnel/tunnel-0104.xsl	Thu Feb 04 17:14:14 2016 +0000
@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Simple test with a tunnel param specified within xsl:call-template -->
+	<!-- Purpose: Simple test with a tunnel param specified within xsl:call-template -->
 
-   <t:template match="/">
-		    <out>
-         <t:call-template name="temp">
-			         <t:with-param name="par1" select="'foo'" tunnel="yes"/>
-		       </t:call-template>
-      </out>
-	  </t:template>
+	<t:template match="/">
+		<out>
+			<t:call-template name="temp">
+				<t:with-param name="par1" select="'foo'" tunnel="yes"/>
+			</t:call-template>
+		</out>
+	</t:template>
 
-   <t:template name="temp">
-		    <t:param name="par1" select="'xyz'" tunnel="yes"/>
-		    <t:value-of select="$par1"/>
-	  </t:template>
+	<t:template name="temp">
+		<t:param name="par1" select="'xyz'" tunnel="yes"/>
+		<t:value-of select="$par1"/>
+	</t:template>
 </t:transform>
--- a/tests/attr/tunnel/tunnel-0106.xsl	Mon Jan 25 14:50:25 2016 +0000
+++ b/tests/attr/tunnel/tunnel-0106.xsl	Thu Feb 04 17:14:14 2016 +0000
@@ -1,23 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Simple test with a tunnel param specified within xsl:call-template 
+	<!-- Purpose: Simple test with a tunnel param specified within xsl:call-template 
                 and the tunnel parameter will be used after having passed through 
                 templates where it wasn't defined in. -->
 
-   <t:template match="/">
-		    <out>
-         <t:call-template name="temp1">
-			         <t:with-param name="par1" select="'foo'" tunnel="yes"/>
-		       </t:call-template>
-      </out>
-	  </t:template>
+	<t:template match="/">
+		<out>
+			<t:call-template name="temp1">
+				<t:with-param name="par1" select="'foo'" tunnel="yes"/>
+			</t:call-template>
+		</out>
+	</t:template>
 
-   <t:template name="temp1">
-		    <t:call-template name="temp2"/>
-	  </t:template>
+	<t:template name="temp1">
+		<t:call-template name="temp2"/>
+	</t:template>
 
-   <t:template name="temp2">
-		    <t:param name="par1" select="'xyz'" tunnel="yes"/>
-		    <t:value-of select="$par1"/>
-	  </t:template>
+	<t:template name="temp2">
+		<t:param name="par1" select="'xyz'" tunnel="yes"/>
+		<t:value-of select="$par1"/>
+	</t:template>
 </t:transform>
--- a/tests/attr/tunnel/tunnel-0111.xsl	Mon Jan 25 14:50:25 2016 +0000
+++ b/tests/attr/tunnel/tunnel-0111.xsl	Thu Feb 04 17:14:14 2016 +0000
@@ -1,28 +1,25 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:foo="http://www.foo.com"
-             xmlns:bar="http://www.bar.com"
-             xmlns:t="http://www.w3.org/1999/XSL/Transform"
-             exclude-result-prefixes="foo bar"
-             version="2.0">
-<!-- Purpose: test tunnel params with same local name but different namespace
+<t:transform xmlns:foo="http://www.foo.com" xmlns:bar="http://www.bar.com"
+	xmlns:t="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="foo bar" version="2.0">
+	<!-- Purpose: test tunnel params with same local name but different namespace
 		specified within xsl:call-template -->
 
-   <t:template match="/">
-		    <out>
-         <t:call-template name="temp1">
-			         <t:with-param name="foo:par1" select="'foo1'" tunnel="yes"/>
-			         <t:with-param name="bar:par1" select="'bar1'" tunnel="yes"/>			
-		       </t:call-template>
-      </out>
-	  </t:template>
+	<t:template match="/">
+		<out>
+			<t:call-template name="temp1">
+				<t:with-param name="foo:par1" select="'foo1'" tunnel="yes"/>
+				<t:with-param name="bar:par1" select="'bar1'" tunnel="yes"/>
+			</t:call-template>
+		</out>
+	</t:template>
 
-   <t:template name="temp1">
-		    <t:call-template name="temp2"/>
-	  </t:template>
+	<t:template name="temp1">
+		<t:call-template name="temp2"/>
+	</t:template>
 
-   <t:template name="temp2">
-		    <t:param name="bar:par1" select="'bar2'" tunnel="yes"/>
-		    <t:param name="foo:par1" select="'foo2'" tunnel="yes"/>		
-		    <t:value-of select="$foo:par1"/> and <t:value-of select="$bar:par1"/>
-	  </t:template>
+	<t:template name="temp2">
+		<t:param name="bar:par1" select="'bar2'" tunnel="yes"/>
+		<t:param name="foo:par1" select="'foo2'" tunnel="yes"/>
+		<t:value-of select="$foo:par1"/> and <t:value-of select="$bar:par1"/>
+	</t:template>
 </t:transform>
--- a/tests/attr/tunnel/tunnel-0208.xsl	Mon Jan 25 14:50:25 2016 +0000
+++ b/tests/attr/tunnel/tunnel-0208.xsl	Thu Feb 04 17:14:14 2016 +0000
@@ -1,23 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test the tunnel parameter specified within xsl:apply-imports and 
+	<!-- Purpose: Test the tunnel parameter specified within xsl:apply-imports and 
   	   the ttribute tunnel="yes" to make sure the parameter is passed on by the 
   	   called template to any further template that it calls. -->
 
-   <t:import href="import1.xsl"/>
+	<t:import href="import1.xsl"/>
 
-   <t:template match="doc">
-		    <out>
-         <t:apply-imports>
-			         <t:with-param name="par" select="'abc'" tunnel="yes"/>		
-		       </t:apply-imports>
-      </out>
-	  </t:template>
+	<t:template match="doc">
+		<out>
+			<t:apply-imports>
+				<t:with-param name="par" select="'abc'" tunnel="yes"/>
+			</t:apply-imports>
+		</out>
+	</t:template>
 
-   <t:template match="data">
-		    <t:param name="par" select="'123'" tunnel="yes"/>		
-		    <t:value-of select="$par"/>
-	  </t:template>
+	<t:template match="data">
+		<t:param name="par" select="'123'" tunnel="yes"/>
+		<t:value-of select="$par"/>
+	</t:template>
 
-   <t:template match="text()"/>
+	<t:template match="text()"/>
 </t:transform>
--- a/tests/attr/tunnel/tunnel-0209.xsl	Mon Jan 25 14:50:25 2016 +0000
+++ b/tests/attr/tunnel/tunnel-0209.xsl	Thu Feb 04 17:14:14 2016 +0000
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: test tunnel param overriden by another tunnel param in xsl:apply-imports -->
-
-   <t:import href="import2.xsl"/>
+	<!-- Purpose: test tunnel param overriden by another tunnel param in xsl:apply-imports -->
 
-   <t:template match="doc">
-		    <out>
-         <t:apply-imports>
-			         <t:with-param name="par" select="'abc'" tunnel="yes"/>		
-		       </t:apply-imports>
-      </out>
-	  </t:template>
+	<t:import href="import2.xsl"/>
 
-   <t:template match="data">
-		    <t:param name="par" select="'123'" tunnel="yes"/>		
-		    <t:value-of select="$par"/>
-	  </t:template>
+	<t:template match="doc">
+		<out>
+			<t:apply-imports>
+				<t:with-param name="par" select="'abc'" tunnel="yes"/>
+			</t:apply-imports>
+		</out>
+	</t:template>
 
-   <t:template match="node()"/>
+	<t:template match="data">
+		<t:param name="par" select="'123'" tunnel="yes"/>
+		<t:value-of select="$par"/>
+	</t:template>
+
+	<t:template match="node()"/>
 </t:transform>
--- a/tests/attr/tunnel/tunnel-0210.xsl	Mon Jan 25 14:50:25 2016 +0000
+++ b/tests/attr/tunnel/tunnel-0210.xsl	Thu Feb 04 17:14:14 2016 +0000
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: simple test of tunnel params passed from xsl:next-match -->
-
-   <t:import href="import1.xsl"/>
+	<!-- Purpose: simple test of tunnel params passed from xsl:next-match -->
 
-   <t:template match="doc">
-		    <out>
-         <t:next-match>
-			         <t:with-param name="par" select="'abc'" tunnel="yes"/>		
-		       </t:next-match>
-      </out>
-	  </t:template>
+	<t:import href="import1.xsl"/>
 
-   <t:template match="data">
-		    <t:param name="par" select="'123'" tunnel="yes"/>		
-		    <t:value-of select="$par"/>
-	  </t:template>
+	<t:template match="doc">
+		<out>
+			<t:next-match>
+				<t:with-param name="par" select="'abc'" tunnel="yes"/>
+			</t:next-match>
+		</out>
+	</t:template>
 
-   <t:template match="text()"/>
+	<t:template match="data">
+		<t:param name="par" select="'123'" tunnel="yes"/>
+		<t:value-of select="$par"/>
+	</t:template>
+
+	<t:template match="text()"/>
 </t:transform>
--- a/tests/attr/tunnel/tunnel-0214.xsl	Mon Jan 25 14:50:25 2016 +0000
+++ b/tests/attr/tunnel/tunnel-0214.xsl	Thu Feb 04 17:14:14 2016 +0000
@@ -1,26 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test different combinations of tunnel parameters and non-tunnel 
+	<!-- Purpose: Test different combinations of tunnel parameters and non-tunnel 
   	   parameters within xsl:apply-templates instruction. -->
 
-   <t:template match="/">
-		    <out>
-         <t:apply-templates select="doc">
-			         <t:with-param name="par1" select="'foo1'" tunnel="no"/>		
-			         <t:with-param name="par2" select="'foo2'" tunnel="yes"/>
-			         <t:with-param name="par3" select="'foo3'" tunnel="no"/>			
-			         <t:with-param name="par4" select="'foo4'" tunnel="yes"/>			
-		       </t:apply-templates>
-      </out>
-	  </t:template>
+	<t:template match="/">
+		<out>
+			<t:apply-templates select="doc">
+				<t:with-param name="par1" select="'foo1'" tunnel="no"/>
+				<t:with-param name="par2" select="'foo2'" tunnel="yes"/>
+				<t:with-param name="par3" select="'foo3'" tunnel="no"/>
+				<t:with-param name="par4" select="'foo4'" tunnel="yes"/>
+			</t:apply-templates>
+		</out>
+	</t:template>
 
-   <t:template match="data">
-			   <t:param name="par1" select="'xyz1'" tunnel="yes"/>
-			   <t:param name="par2" select="'xyz2'" tunnel="yes"/>
-			   <t:param name="par3" select="'xyz3'" tunnel="no"/>
-			   <t:param name="par4" select="'xyz4'" tunnel="no"/>		
-			   <t:value-of select="$par1"/>, <t:value-of select="$par2"/>, <t:value-of select="$par3"/>, <t:value-of select="$par4"/>
-	  </t:template>
+	<t:template match="data">
+		<t:param name="par1" select="'xyz1'" tunnel="yes"/>
+		<t:param name="par2" select="'xyz2'" tunnel="yes"/>
+		<t:param name="par3" select="'xyz3'" tunnel="no"/>
+		<t:param name="par4" select="'xyz4'" tunnel="no"/>
+		<t:value-of select="$par1"/>, <t:value-of select="$par2"/>, <t:value-of select="$par3"/>, <t:value-of select="$par4"/>
+	</t:template>
 
-   <t:template match="text()"/>
+	<t:template match="text()"/>
 </t:transform>
--- a/tests/attr/tunnel/tunnel-0216.xsl	Mon Jan 25 14:50:25 2016 +0000
+++ b/tests/attr/tunnel/tunnel-0216.xsl	Thu Feb 04 17:14:14 2016 +0000
@@ -1,24 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Tests the tunnel parameters specified within xsl:apply-imports 
+	<!-- Purpose: Tests the tunnel parameters specified within xsl:apply-imports 
        with both tunnel="no" and tunnel="yes" attributes. -->
 
-   <t:import href="import2.xsl"/>
+	<t:import href="import2.xsl"/>
 
-   <t:template match="doc">
-		    <out>
-         <t:apply-imports>
-			         <t:with-param name="par" select="'foo'" tunnel="no"/>
-			         <t:with-param name="par2" select="'bar'" tunnel="yes"/>		
-		       </t:apply-imports>
-      </out>
-	  </t:template>
+	<t:template match="doc">
+		<out>
+			<t:apply-imports>
+				<t:with-param name="par" select="'foo'" tunnel="no"/>
+				<t:with-param name="par2" select="'bar'" tunnel="yes"/>
+			</t:apply-imports>
+		</out>
+	</t:template>
 
-   <t:template match="data">
-		    <t:param name="par" select="'xyz'" tunnel="yes"/>
-		    <t:param name="par2" select="'zyx'" tunnel="yes"/>
-		    <t:value-of select="$par"/> and <t:value-of select="$par2"/>
-	  </t:template>
+	<t:template match="data">
+		<t:param name="par" select="'xyz'" tunnel="yes"/>
+		<t:param name="par2" select="'zyx'" tunnel="yes"/>
+		<t:value-of select="$par"/> and <t:value-of select="$par2"/>
+	</t:template>
 
-   <t:template match="text()"/>
+	<t:template match="text()"/>
 </t:transform>
--- a/tests/attr/tunnel/tunnel-0227.xsl	Mon Jan 25 14:50:25 2016 +0000
+++ b/tests/attr/tunnel/tunnel-0227.xsl	Thu Feb 04 17:14:14 2016 +0000
@@ -1,23 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Tests tunnel parameter specified within xsl:next-match 
+   <!-- Purpose: Tests tunnel parameter specified within xsl:next-match 
        and a global parameter with an identical name as the tunnel parameter, 
        which should be ignored. -->
 
    <t:param name="par1" select="'global'"/>
 
    <t:template match="doc">
-		    <out>
+      <out>
          <t:next-match>
-			         <t:with-param name="par1" select="'abc'" tunnel="yes"/>		
-		       </t:next-match>
+            <t:with-param name="par1" select="'abc'" tunnel="yes"/>
+         </t:next-match>
       </out>
-	  </t:template>
+   </t:template>
 
    <t:template match="data">
-		    <t:param name="par1" select="'123'" tunnel="yes"/>		
-		    <t:value-of select="$par1"/>
-	  </t:template>
+      <t:param name="par1" select="'123'" tunnel="yes"/>
+      <t:value-of select="$par1"/>
+   </t:template>
 
    <t:template match="text()"/>
 </t:transform>
--- a/tests/attr/tunnel/tunnel-0406.xsl	Mon Jan 25 14:50:25 2016 +0000
+++ b/tests/attr/tunnel/tunnel-0406.xsl	Thu Feb 04 17:14:14 2016 +0000
@@ -1,30 +1,34 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test case where the intial template launches on an element other than root. 
+	<!-- Purpose: Test case where the intial template launches on an element other than root. 
   				Initially the template gets invoked and does not have any tunnel parameters.
   				Further processing would invoke another template which is aimed to be called
   				on the same initial node and passes a tunnel parameters to it. -->
-
-   <t:template match="data">
-  		  <t:param name="foo" select="'default_value'" tunnel="yes"/>
-  		  <out>
-         <t:text>Parameter foo is: </t:text>
-         <t:value-of select="$foo"/>
-      </out>
-		    <t:if test="($foo='default_value')">
-			      <t:apply-templates/>
-		    </t:if>
-	  </t:template>
+	
+	<t:template match="/">
+		<doc><t:apply-templates/></doc>
+	</t:template>
 
-   <t:template match="inner">
-		    <t:call-template name="A"/>
-	  </t:template>
+	<t:template match="data">
+		<t:param name="foo" select="'default_value'" tunnel="yes"/>
+		<out>
+			<t:text>Parameter foo is: </t:text>
+			<t:value-of select="$foo"/>
+		</out>
+		<t:if test="($foo='default_value')">
+			<t:apply-templates/>
+		</t:if>
+	</t:template>
 
-   <t:template name="A">
-		    <t:apply-templates select="//data">
-			      <t:with-param name="foo" select="'passed_value'" tunnel="yes"/>
-		    </t:apply-templates>
-	  </t:template>
+	<t:template match="inner">
+		<t:call-template name="A"/>
+	</t:template>
 
-   <t:template match="text()"/>
+	<t:template name="A">
+		<t:apply-templates select="//data">
+			<t:with-param name="foo" select="'passed_value'" tunnel="yes"/>
+		</t:apply-templates>
+	</t:template>
+
+	<t:template match="text()"/>
 </t:transform>