Commit merge
authorMichael Kay <mike@saxonica.com>
Tue, 12 Aug 2014 10:05:04 +0100
changeset 607 414cc8d7dd90
parent 606 cd134dfb64ae (current diff)
parent 603 796bddc3ada6 (diff)
child 608 45bb3c5af269
Commit merge
--- a/tests/attr/as/_as-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/attr/as/_as-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?> 
 <test-set xmlns="http://www.w3.org/2012/10/xslt-test-catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="as">
    <description>Tests as</description>
    <environment name="as-01">
--- a/tests/attr/expand-text/_expand-text-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/attr/expand-text/_expand-text-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -53,7 +53,7 @@
    <test-case name="cvt-004">
       <description>Expansion enabled at template level</description>
       <keywords>xsl:stylesheet expand-text-attribute expand-override lre variable-reference</keywords>
-      <created by="Michael Kay" on="2013-01-25"/>
+      <created by="Michael Kay" on="2013-01-25"/>      
       <dependencies>
          <spec value="XSLT30+"/>
       </dependencies>
@@ -70,6 +70,7 @@
       <description>Atomization</description>
       <keywords>xsl:stylesheet expand-override variable-reference xsl:template lre</keywords>
       <created by="Michael Kay" on="2013-01-25"/>
+      <modified by="Debbie Lockett" on="2014-08-05" change="use expand-text='true' and 'false'"/>
       <dependencies>
          <spec value="XSLT30+"/>
       </dependencies>
@@ -86,6 +87,7 @@
       <description>Space separation</description>
       <keywords>xsl:stylesheet expand-override expand-text-attribute xsl:template numeric-literals lre</keywords>
       <created by="Michael Kay" on="2013-01-25"/>
+      <modified by="Debbie Lockett" on="2014-08-05" change="use expand-text='1' and '0'"/>
       <dependencies>
          <spec value="XSLT30+"/>
       </dependencies>
@@ -137,6 +139,7 @@
       <description>expand-text must be yes or no</description>
       <keywords>XTSE0020 wrong-attribute-value expand-text-attribute xsl:template xsl:stylesheet</keywords>
       <created by="Michael Kay" on="2013-02-05"/>
+      <modified by="Debbie Lockett" on="2014-08-05" change="expand-text must be yes|no|true|false|1|0, e.g. not TRUE"/>
       <dependencies>
          <spec value="XSLT30+"/>
       </dependencies>
@@ -153,6 +156,7 @@
       <description>expand-text must be yes or no</description>
       <keywords>expand-text-attribute xsl:stylesheet xsl:template wrong-attribute-value</keywords>
       <created by="Michael Kay" on="2013-02-05"/>
+      <modified by="Debbie Lockett" on="2014-08-05" change="expand-text must be yes|no|true|false|1|0, e.g. not empty"/>
       <dependencies>
          <spec value="XSLT30+"/>
       </dependencies>
--- a/tests/attr/expand-text/cvt-005.xsl	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/attr/expand-text/cvt-005.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -2,13 +2,13 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
     exclude-result-prefixes="xs"
-    expand-text="no"
+    expand-text=" false "
     version="3.0">
     
     <xsl:param name="Hello"><Goodbye/></xsl:param>
     <xsl:param name="World"><Mars/></xsl:param>
     
-    <xsl:template name="main" expand-text=" yes ">
+    <xsl:template name="main" expand-text=" true ">
         <out>{$Hello} {$World}!</out>
     </xsl:template>
     
--- a/tests/attr/expand-text/cvt-006.xsl	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/attr/expand-text/cvt-006.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -2,11 +2,11 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
     exclude-result-prefixes="xs"
-    expand-text="no"
+    expand-text="0"
     version="3.0">
 
     
-    <xsl:template name="main" expand-text=" yes ">
+    <xsl:template name="main" expand-text=" 1 ">
         <out>{1,2} {3,4}{5,6}</out>
     </xsl:template>
     
--- a/tests/attr/expand-text/cvt-009.xsl	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/attr/expand-text/cvt-009.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -5,7 +5,7 @@
     expand-text="no"
     version="3.0">
 
-    <xsl:template name="main" expand-text="true">
+    <xsl:template name="main" expand-text="TRUE">
         <out>
             <xsl:attribute name="a">{1,2} {3,4}{5,6}</xsl:attribute>
             <xsl:attribute name="b" separator=" ">{1,2} {3,4}{5,6}</xsl:attribute>
--- a/tests/attr/tunnel/_tunnel-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/attr/tunnel/_tunnel-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -295,7 +295,67 @@
          <error code="XTSE0020"/>
       </result>
    </test-case>
-
+   
+   <test-case name="tunnel-0117">
+      <description>Simple test with a non-tunnel param (tunnel="false") specified within xsl:apply-templates but template param has tunnel="true"</description>
+      <created by="Debbie Lockett" on="2014-08-05"/>
+      <environment ref="tunnel-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="tunnel-0117.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>xyz and zyx</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="tunnel-0118">
+      <description>Simple test with a tunnel param (tunnel="true") specified within xsl:call-template but template param has tunnel="false"</description>
+      <created by="Debbie Lockett" on="2014-08-05"/>
+      <environment ref="tunnel-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="tunnel-0118.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>xyz and zyx</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="tunnel-0119">
+      <description>Simple test with a non-tunnel param (tunnel="0") specified within xsl:apply-templates but template param has tunnel="1"</description>
+      <created by="Debbie Lockett" on="2014-08-05"/>
+      <environment ref="tunnel-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="tunnel-0119.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>xyz and zyx</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="tunnel-0120">
+      <description>Simple test with a tunnel param (tunnel="1") specified within xsl:call-template but template param has tunnel="0"</description>
+      <created by="Debbie Lockett" on="2014-08-05"/>
+      <environment ref="tunnel-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="tunnel-0120.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>xyz and zyx</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
    <test-case name="tunnel-0201">
       <description>Simple test with a tunnel param specified within xsl:apply-templates and the tunnel param value is later retrieved</description>
       <created by="Michael Kay" on="2012-10-30"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/tunnel/tunnel-0117.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,20 @@
+<?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 non-tunnel param (tunnel="false") specified within xsl:apply-templates
+  		but template param has tunnel="true" -->
+
+   <t:template match="/">
+		    <out>
+         <t:apply-templates select="doc">
+			         <t:with-param name="par1" select="'foo'"/>
+			         <t:with-param name="par2" select="'bar'" tunnel="false"/>
+		       </t:apply-templates>
+      </out>
+	  </t:template>
+
+   <t:template match="doc">
+		    <t:param name="par1" select="'xyz'" tunnel="true"/>
+		    <t:param name="par2" select="'zyx'" tunnel="true"/>
+		    <t:value-of select="$par1"/> and <t:value-of select="$par2"/>
+	  </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/tunnel/tunnel-0118.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+	<!-- Purpose: Simple test with a tunnel param (tunnel="true") specified within xsl:call-template
+  		but template param has tunnel="false" -->
+
+   <t:template match="/">
+		    <out>
+         <t:call-template name="temp">
+			         <t:with-param name="par1" select="'foo'" tunnel="true"/>
+			         <t:with-param name="par2" select="'bar'" tunnel="  true"/>
+		       </t:call-template>
+      </out>
+	  </t:template>
+
+   <t:template name="temp">
+		    <t:param name="par1" select="'xyz'" tunnel="false"/>
+		    <t:param name="par2" select="'zyx'"/>
+		    <t:value-of select="$par1"/> and <t:value-of select="$par2"/>
+	  </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/tunnel/tunnel-0119.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,20 @@
+<?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 non-tunnel param (tunnel="0") specified within xsl:apply-templates
+  		but template param has tunnel="1" -->
+
+   <t:template match="/">
+		    <out>
+         <t:apply-templates select="doc">
+			         <t:with-param name="par1" select="'foo'"/>
+			         <t:with-param name="par2" select="'bar'" tunnel="0"/>
+		       </t:apply-templates>
+      </out>
+	  </t:template>
+
+   <t:template match="doc">
+		    <t:param name="par1" select="'xyz'" tunnel="1"/>
+		    <t:param name="par2" select="'zyx'" tunnel="  1  "/>
+		    <t:value-of select="$par1"/> and <t:value-of select="$par2"/>
+	  </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/tunnel/tunnel-0120.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Simple test with a tunnel param (tunnel="1") specified within xsl:call-template
+  		but template param has tunnel="0" -->
+
+   <t:template match="/">
+		    <out>
+         <t:call-template name="temp">
+			         <t:with-param name="par1" select="'foo'" tunnel="1"/>
+			         <t:with-param name="par2" select="'bar'" tunnel=" 1 "/>
+		       </t:call-template>
+      </out>
+	  </t:template>
+
+   <t:template name="temp">
+		    <t:param name="par1" select="'xyz'" tunnel="0"/>
+		    <t:param name="par2" select="'zyx'"/>
+		    <t:value-of select="$par1"/> and <t:value-of select="$par2"/>
+	  </t:template>
+</t:transform>
--- a/tests/attr/use-when/_use-when-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/attr/use-when/_use-when-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -714,6 +714,36 @@
          <error code="XTSE3450"/>
       </result>
    </test-case>
+   
+   <test-case name="use-when-0139">
+      <description>test that the statically declared param and variable (with static="true") are allowed in an excluded section.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="use-when-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="use-when-0139.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<p>value matched ok $xx=2</p>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="use-when-0140">
+      <description>test that the statically declared param and variable (with static="1") are allowed in an excluded section.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="use-when-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="use-when-0140.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<p>value matched ok $xx=2</p>]]></assert-xml>
+      </result>
+   </test-case>
 
    <test-case name="use-when-0201">
       <description>Test case that uses use-when attribute with a value of true on an xsl:template.</description>
@@ -1305,6 +1335,66 @@
          </all-of>
       </result>
    </test-case>
+   
+   <test-case name="use-when-0408">
+      <description>Test case using a variable with static="no" attribute, that uses use-when with an EBV of true on an xsl:choose instruction.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="use-when-04"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="use-when-0408.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>-1</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="use-when-0409">
+      <description>Test case using a variable with static="false" attribute, that uses use-when with an EBV of true on an xsl:choose instruction.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="use-when-04"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="use-when-0409.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>-1</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="use-when-0410">
+      <description>Test case using a variable with static="0" attribute, that uses use-when with an EBV of true on an xsl:choose instruction.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="use-when-04"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="use-when-0410.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>-1</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="use-when-0411">
+      <description>Test case using a variable with static="" attribute (not allowed), that uses use-when with an EBV of true on an xsl:choose instruction.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="use-when-04"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="use-when-0411.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
 
    <test-case name="use-when-0501">
       <description>Test case that uses use-when on xsl:sort to avoid ascending sort.</description>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/use-when/use-when-0139.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+
+  <!-- PURPOSE: test that the statically declared param and variable (with static="true") are allowed in an excluded section. -->
+  <?spec xslt#conditional-inclusion?>
+  <xsl:variable name="xx" select="2" static="true"/> 
+  <xsl:param name="xxx" select="3" static="true" /> 
+  <xsl:template match="*" use-when="some $x in (1,2,3) satisfies $x=$xxx">
+    <p>value matched ok $xx=<xsl:value-of select="$xx" /></p>
+  </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/use-when/use-when-0140.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+
+  <!-- PURPOSE: test that the statically declared param and variable (with static="1") are allowed in an excluded section. -->
+  <?spec xslt#conditional-inclusion?>
+  <xsl:variable name="xx" select="2" static=" 1 "/> 
+  <xsl:param name="xxx" select="3" static="1" /> 
+  <xsl:template match="*" use-when="some $x in (1,2,3) satisfies $x=$xxx">
+    <p>value matched ok $xx=<xsl:value-of select="$xx" /></p>
+  </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/use-when/use-when-0408.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xslt:transform xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+                exclude-result-prefixes="xs"
+                version="3.0">
+	<!-- Purpose: Test case using a variable with static="no" attribute, that uses use-when with an EBV of true on an xsl:choose instruction. -->
+
+   <xslt:variable name="x" as="xs:string" select="'error'" static=" no"/>
+
+   <xslt:template match="doc">   
+		    <out>
+         <xslt:choose use-when="true()">
+		          <xslt:when test="($x castable as xs:integer)" use-when="false()">
+		             <xslt:sequence select="-1"/>
+		          </xslt:when>
+		          <xslt:when test="not($x castable as xs:integer)" use-when="true()">
+		             <xslt:sequence select="-1"/>
+		          </xslt:when>
+		          <xslt:when test="xs:integer($x) lt 0" use-when="'a'='a'">
+	  	           <xslt:sequence select="-2"/>
+	 	         </xslt:when>
+	 	         <xslt:otherwise use-when="1=1">
+	 	            <xslt:sequence select="xs:integer($x)"/>
+		          </xslt:otherwise>
+		       </xslt:choose>
+      </out>
+	  </xslt:template>
+</xslt:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/use-when/use-when-0409.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xslt:transform xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+                exclude-result-prefixes="xs"
+                version="3.0">
+	<!-- Purpose: Test case using a variable with static="false" attribute, that uses use-when with an EBV of true on an xsl:choose instruction. -->
+
+   <xslt:variable name="x" as="xs:string" select="'error'" static="false"/>
+
+   <xslt:template match="doc">   
+		    <out>
+         <xslt:choose use-when="true()">
+		          <xslt:when test="($x castable as xs:integer)" use-when="false()">
+		             <xslt:sequence select="-1"/>
+		          </xslt:when>
+		          <xslt:when test="not($x castable as xs:integer)" use-when="true()">
+		             <xslt:sequence select="-1"/>
+		          </xslt:when>
+		          <xslt:when test="xs:integer($x) lt 0" use-when="'a'='a'">
+	  	           <xslt:sequence select="-2"/>
+	 	         </xslt:when>
+	 	         <xslt:otherwise use-when="1=1">
+	 	            <xslt:sequence select="xs:integer($x)"/>
+		          </xslt:otherwise>
+		       </xslt:choose>
+      </out>
+	  </xslt:template>
+</xslt:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/use-when/use-when-0410.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xslt:transform xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+                exclude-result-prefixes="xs"
+                version="3.0">
+	<!-- Purpose: Test case using a variable with static="0" attribute, that uses use-when with an EBV of true on an xsl:choose instruction. -->
+
+   <xslt:variable name="x" as="xs:string" select="'error'" static="0"/>
+
+   <xslt:template match="doc">   
+		    <out>
+         <xslt:choose use-when="true()">
+		          <xslt:when test="($x castable as xs:integer)" use-when="false()">
+		             <xslt:sequence select="-1"/>
+		          </xslt:when>
+		          <xslt:when test="not($x castable as xs:integer)" use-when="true()">
+		             <xslt:sequence select="-1"/>
+		          </xslt:when>
+		          <xslt:when test="xs:integer($x) lt 0" use-when="'a'='a'">
+	  	           <xslt:sequence select="-2"/>
+	 	         </xslt:when>
+	 	         <xslt:otherwise use-when="1=1">
+	 	            <xslt:sequence select="xs:integer($x)"/>
+		          </xslt:otherwise>
+		       </xslt:choose>
+      </out>
+	  </xslt:template>
+</xslt:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/use-when/use-when-0411.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xslt:transform xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+                exclude-result-prefixes="xs"
+                version="3.0">
+	<!-- Purpose: Test case using a variable with static="" attribute (not allowed), that uses use-when with an EBV of true on an xsl:choose instruction. -->
+
+   <xslt:variable name="x" as="xs:string" select="'error'" static=""/>
+
+   <xslt:template match="doc">   
+		    <out>
+         <xslt:choose use-when="true()">
+		          <xslt:when test="($x castable as xs:integer)" use-when="false()">
+		             <xslt:sequence select="-1"/>
+		          </xslt:when>
+		          <xslt:when test="not($x castable as xs:integer)" use-when="true()">
+		             <xslt:sequence select="-1"/>
+		          </xslt:when>
+		          <xslt:when test="xs:integer($x) lt 0" use-when="'a'='a'">
+	  	           <xslt:sequence select="-2"/>
+	 	         </xslt:when>
+	 	         <xslt:otherwise use-when="1=1">
+	 	            <xslt:sequence select="xs:integer($x)"/>
+		          </xslt:otherwise>
+		       </xslt:choose>
+      </out>
+	  </xslt:template>
+</xslt:transform>
--- a/tests/decl/output/_output-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/decl/output/_output-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -62,6 +62,36 @@
       </result>
    </test-case>
    
+   <test-case name="output-0101a">
+      <description>Test escaping of non-ASCII characters in HTML output when @escape-uri-attributes="true".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0101a.xsl"/>
+      </test>
+      <result>
+         <serialization-matches>href=["']http://iri.example.org/%EF%AD%8F/%C3%A5rsrapport/%C3%A5r/2005\?x=y["']</serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0101b">
+      <description>Test escaping of non-ASCII characters in HTML output when @escape-uri-attributes="1".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0101b.xsl"/>
+      </test>
+      <result>
+         <serialization-matches>href=["']http://iri.example.org/%EF%AD%8F/%C3%A5rsrapport/%C3%A5r/2005\?x=y["']</serialization-matches>
+      </result>
+   </test-case>
+   
    <environment name="output-0102">
       <stylesheet file="output-0102.xsl"/>
    </environment> 
@@ -302,6 +332,36 @@
          <serialization-matches><![CDATA[<\?xml version="1.0" encoding="UTF-8"\?>\s*<html xmlns="http://www.w3.org/1999/xhtml">\s*<body>This is the body</body>\s*</html>]]></serialization-matches>
       </result>
    </test-case>
+   
+   <test-case name="output-0106a">
+      <description>Test indent="true", with XHTML output where the stylesheet has a default namespace defined on the html element itself.</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0106a.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<\?xml version="1.0" encoding="UTF-8"\?>\s*<html xmlns="http://www.w3.org/1999/xhtml">\s+<body>This is the body</body>\s+</html>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0106b">
+      <description>Test indent=" 1 ", with XHTML output where the stylesheet has a default namespace defined on the html element itself.</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0106b.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<\?xml version="1.0" encoding="UTF-8"\?>\s*<html xmlns="http://www.w3.org/1999/xhtml">\s+<body>This is the body</body>\s+</html>]]></serialization-matches>
+      </result>
+   </test-case>
 
    <test-case name="output-0107">
       <description>Test for SCRIPT handling with XHTML output method.</description>
@@ -362,6 +422,36 @@
          <assert-serialization method="xhtml" file="output030.out"/>
       </result>
    </test-case>
+   
+   <test-case name="output-0110a">
+      <description>Test for the xhtml output method with omit-xml-declaration="true".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0110a.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output030.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0110b">
+      <description>Test for the xhtml output method with omit-xml-declaration="1".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0110b.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output030.out"/>
+      </result>
+   </test-case>
 
    <test-case name="output-0111">
       <description>Test XHTML output with @doctype-system only.</description>
@@ -436,8 +526,8 @@
       <result>
          <assert-serialization method="xhtml" file="output043.out"/>
       </result>
-   </test-case>
-
+   </test-case>   
+   
    <test-case name="output-0116">
       <description>Test empty elements with empty content model in XHTML output and @indent=no.</description>
       <created by="Michael Kay" on="2012-10-30"/>
@@ -452,6 +542,36 @@
          <assert-serialization method="xhtml" file="output045.out"/>
       </result>
    </test-case>
+   
+   <test-case name="output-0116a">
+      <description>Test empty elements with empty content model in XHTML output and @indent=" false".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0116a.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output045.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0116b">
+      <description>Test empty elements with empty content model in XHTML output and @indent="0".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0116b.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output045.out"/>
+      </result>
+   </test-case>
 
    <test-case name="output-0117">
       <description>Boolean attributes should not be output in minimized form.</description>
@@ -595,12 +715,55 @@
 	</all-of>
       </result>
    </test-case>
+   
+   <test-case name="output-0124a">
+      <description>Test HTML output with include-content-type="true", the result tree has a 'head' element.</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0124a.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches flags="i"><![CDATA[http-equiv="Content-Type"]]></serialization-matches>
+            <serialization-matches><![CDATA[="Content-Type"]]></serialization-matches>
+            <serialization-matches flags="i"><![CDATA[content="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+            <serialization-matches><![CDATA[="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+            <serialization-matches><![CDATA[<HEAD>[^<]*<[Mm][Ee][Tt][Aa][^>\\]*>[^<]*</HEAD>]]></serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0124b">
+      <description>Test HTML output with include-content-type="1", the result tree has a 'head' element.</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0124b.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches flags="i"><![CDATA[http-equiv="Content-Type"]]></serialization-matches>
+            <serialization-matches><![CDATA[="Content-Type"]]></serialization-matches>
+            <serialization-matches flags="i"><![CDATA[content="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+            <serialization-matches><![CDATA[="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+            <serialization-matches><![CDATA[<HEAD>[^<]*<[Mm][Ee][Tt][Aa][^>\\]*>[^<]*</HEAD>]]></serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
 
    <test-case name="output-0125">
       <description>Test HTML output with include-content-type value set to "no".</description>
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="Tim Mills" on="2013-01-29" change="Use serialization-matches"/>
       <modified by="Michael Kay" on="2013-01-31" change="Correct regex in 3rd assertion"/>
+      <modified by="Debbie Lockett" on="2014-08-07" change="Add error to not/any-of assertions"/>
       <environment ref="output-01"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -611,6 +774,7 @@
       <result>
 	<not>
 	  <any-of>
+	     <error code="*"/>
 	    <serialization-matches flags="i"><![CDATA[http-equiv="Content-Type"]]></serialization-matches>
 	    <serialization-matches flags="i"><![CDATA[content="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
 	    <serialization-matches><![CDATA[<HEAD>[^<]*<[Mm][Ee][Tt][Aa][^>]*a[^<]*></HEAD>]]></serialization-matches>
@@ -618,6 +782,50 @@
 	</not>
       </result>
    </test-case>
+   
+   <test-case name="output-0125a">
+      <description>Test HTML output with include-content-type value set to "false".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0125a.xsl"/>
+      </test>
+      <result>
+         <not>
+            <any-of>
+               <error code="*"/>
+               <serialization-matches flags="i"><![CDATA[http-equiv="Content-Type"]]></serialization-matches>
+               <serialization-matches flags="i"><![CDATA[content="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+               <serialization-matches><![CDATA[<HEAD>[^<]*<[Mm][Ee][Tt][Aa][^>]*a[^<]*></HEAD>]]></serialization-matches>
+            </any-of>
+         </not>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0125b">
+      <description>Test HTML output with include-content-type value set to "0".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0125b.xsl"/>
+      </test>
+      <result>
+         <not>
+            <any-of>
+               <error code="*"/>
+               <serialization-matches flags="i"><![CDATA[http-equiv="Content-Type"]]></serialization-matches>
+               <serialization-matches flags="i"><![CDATA[content="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+               <serialization-matches><![CDATA[<HEAD>[^<]*<[Mm][Ee][Tt][Aa][^>]*a[^<]*></HEAD>]]></serialization-matches>
+            </any-of>
+         </not>
+      </result>
+   </test-case>
 
    <test-case name="output-0126">
       <description>Test XHTML output with default value for @include-content-type, the result tree has a 'head' element in the XHTML namespace and '@media-type="application/xhtml-xml".</description>
@@ -802,6 +1010,46 @@
          </all-of>
       </result>
    </test-case>
+   
+   <test-case name="output-0136a">
+      <description>Test XHTML output with @byte-order-mark=true. Encoding is UTF-8.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0136a.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches><![CDATA[<\?xml]]></serialization-matches>
+            <serialization-matches><![CDATA[<html\s+xmlns="http://www.w3.org/1999/xhtml">]]></serialization-matches>
+            <serialization-matches><![CDATA[<body>Hello</body>]]></serialization-matches>
+            <serialization-matches>^&#xfeff;</serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0136b">
+      <description>Test XHTML output with @byte-order-mark="1". Encoding is UTF-8.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0136b.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches><![CDATA[<\?xml]]></serialization-matches>
+            <serialization-matches><![CDATA[<html\s+xmlns="http://www.w3.org/1999/xhtml">]]></serialization-matches>
+            <serialization-matches><![CDATA[<body>Hello</body>]]></serialization-matches>
+            <serialization-matches>^&#xfeff;</serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
 
    <test-case name="output-0137">
       <description>Test XHTML output with @byte-order-mark=no.Encoding is UTF-8.</description>
@@ -817,6 +1065,36 @@
          <assert-serialization method="text" file="output113.out"/>
       </result>
    </test-case>
+   
+   <test-case name="output-0137a">
+      <description>Test XHTML output with @byte-order-mark=false. Encoding is UTF-8.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0137a.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="text" file="output113.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0137b">
+      <description>Test XHTML output with @byte-order-mark="0". Encoding is UTF-8.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0137b.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="text" file="output113.out"/>
+      </result>
+   </test-case>
 
    <test-case name="output-0138">
       <description>Test of XHTML output with @cdata-section-elements with a list of names with or without prefixes.</description>
@@ -882,6 +1160,42 @@
 	</all-of>
       </result>
    </test-case>
+   
+   <test-case name="output-0141a">
+      <description>Test XHTML output with @escape-uri-attributes="false". Use fn:escape-html-uri to escape some URIs but not all.</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>      
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0141a.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches><![CDATA[<a href="http://iri.example.org/ﭏ/årsrapport/år/2005\?x=y">not escaped</a>]]></serialization-matches>
+            <serialization-matches><![CDATA[<a href="http://iri.example.org/%EF%AD%8F/%C3%A5rsrapport/a%CC%8Ar/2005\?x=y"></a>]]></serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0141b">
+      <description>Test XHTML output with @escape-uri-attributes=" 0 ". Use fn:escape-html-uri to escape some URIs but not all.</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0141b.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches><![CDATA[<a href="http://iri.example.org/ﭏ/årsrapport/år/2005\?x=y">not escaped</a>]]></serialization-matches>
+            <serialization-matches><![CDATA[<a href="http://iri.example.org/%EF%AD%8F/%C3%A5rsrapport/a%CC%8Ar/2005\?x=y"></a>]]></serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
 
    <test-case name="output-0142">
       <description>Test XHTML output with include-content-type=yes, the result tree has a 'head' element in the XHTML namespace and '@media-type="application/xhtml-xml".</description>
@@ -987,6 +1301,36 @@
          <assert-serialization method="xhtml" file="output134.out"/>
       </result>
    </test-case>
+   
+   <test-case name="output-0148a">
+      <description>Test for the xhtml output method with omit-xml-declaration="false"</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0148a.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output134.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0148b">
+      <description>Test for the xhtml output method with omit-xml-declaration="0"</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0148b.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output134.out"/>
+      </result>
+   </test-case>
 
    <test-case name="output-0149">
       <description>Test for the xhtml output method @standalone=yes.</description>
@@ -1002,6 +1346,36 @@
          <assert-serialization method="xhtml" file="output136.out"/>
       </result>
    </test-case>
+   
+   <test-case name="output-0149a">
+      <description>Test for the xhtml output method @standalone="true".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0149a.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output136.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0149b">
+      <description>Test for the xhtml output method @standalone="1".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0149b.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output136.out"/>
+      </result>
+   </test-case>
 
    <test-case name="output-0150">
       <description>Test for the xhtml output method @standalone=no.</description>
@@ -1017,6 +1391,36 @@
          <assert-serialization method="xhtml" file="output137.out"/>
       </result>
    </test-case>
+   
+   <test-case name="output-0150a">
+      <description>Test for the xhtml output method @standalone="false".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0150a.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output137.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0150b">
+      <description>Test for the xhtml output method @standalone="0".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0150b.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output137.out"/>
+      </result>
+   </test-case>
 
    <test-case name="output-0151">
       <description>Test empty elements with non-empty content model in XHTML output.</description>
@@ -1467,6 +1871,105 @@
          <assert-serialization method="xhtml" file="output176.out"/>
       </result>
    </test-case>
+   
+   <test-case name="output-0176a">
+      <description>Test for disabling-output-escaping="true" in xsl:text</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0176a.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output176.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0176b">
+      <description>Test for disabling-output-escaping="1" in xsl:text</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0176b.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output176.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0176c">
+      <description>Test for disabling-output-escaping=" no " in xsl:text</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0176c.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<body>&lt;p&gt;&amp;nbsp;&lt;/p&gt;</body>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0176d">
+      <description>Test for disabling-output-escaping="false" in xsl:text</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0176d.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<body>&lt;p&gt;&amp;nbsp;&lt;/p&gt;</body>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0176e">
+      <description>Test for disabling-output-escaping="0" in xsl:text</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0176e.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<body>&lt;p&gt;&amp;nbsp;&lt;/p&gt;</body>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0176f">
+      <description>Test for disabling-output-escaping=" " (not allowed) in xsl:text</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0176f.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
 
    <test-case name="output-0177">
       <description>Test for disabling output escaping in xsl:text</description>
@@ -1787,9 +2290,10 @@
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="Tim Mills" on="2013-01-29" change="all-of to any-of"/>
       <modified by="Tim Mills" on="2013-01-29" change="error to assert-serialization-error"/>
+      <modified by="Debbie Lockett" on="2014-08-06" change="spec value to XSLT20 only, see test output-0197a"/>
       <environment ref="output-01"/>
       <dependencies>
-         <spec value="XSLT20+"/>
+         <spec value="XSLT20"/>
       </dependencies>
       <test>
          <stylesheet file="output-0197.xsl"/>
@@ -1801,15 +2305,34 @@
          </any-of>
       </result>
    </test-case>
+   
+   <test-case name="output-0197a">
+      <description>Test that an error is raised on invalid @byte-order-mark value ("TRUE") in xsl:output.</description>      
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0197a.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
 
    <test-case name="output-0198">
       <description>Test that an error is raised on invalid @escape-uri-attributes value in xsl:output.</description>
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="Tim Mills" on="2013-01-29" change="all-of to any-of"/>
       <modified by="Tim Mills" on="2013-01-29" change="error to assert-serialization-error"/>
+      <modified by="Debbie Lockett" on="2014-08-06" change="spec value to XSLT20 only, see test output-0198a"/>
       <environment ref="output-01"/>
       <dependencies>
-         <spec value="XSLT20+"/>
+         <spec value="XSLT20"/>
       </dependencies>
       <test>
          <stylesheet file="output-0198.xsl"/>
@@ -1821,14 +2344,33 @@
          </any-of>
       </result>
    </test-case>
+   
+   <test-case name="output-0198a">
+      <description>Test that an error is raised on invalid @escape-uri-attributes value ("YES") in xsl:output.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0198a.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
 
    <test-case name="output-0199">
       <description>Test that an error is raised on invalid @include-content-type value in xsl:output.</description>
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="Tim Mills" on="2013-01-29" change="all-of to any-of"/>
+      <modified by="Debbie Lockett" on="2014-08-06" change="spec value to XSLT20 only, see test output-0199a"/>
       <environment ref="output-01"/>
       <dependencies>
-         <spec value="XSLT20+"/>
+         <spec value="XSLT20"/>
       </dependencies>
       <test>
          <stylesheet file="output-0199.xsl"/>
@@ -1840,6 +2382,24 @@
          </any-of>
       </result>
    </test-case>
+   
+   <test-case name="output-0199a">
+      <description>Test that an error is raised on invalid @include-content-type value ("TRUE") in xsl:output.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0199a.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
 
    <test-case name="output-0201">
       <description>Simple test for using one character map with the XML output method.</description>
@@ -2049,6 +2609,7 @@
       </description>
       <created by="Michael Kay" on="2012-12-05"/>
       <modified by="Abel Braaksma" on="2013-12-10" change="@html-version occured in xslt3.0 spec, stylesheet @version=3.0"/>
+      <modified by="Debbie Lockett" on="2014-08-07" change="Add error in not/any-of assertions"/>
       <environment ref="output-02"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -2058,7 +2619,10 @@
       </test>
       <result>
          <not>
-            <serialization-matches>DOCTYPE</serialization-matches>
+            <any-of>
+               <error code="*"/>
+               <serialization-matches>DOCTYPE</serialization-matches>
+            </any-of>            
          </not>
       </result>
    </test-case>
@@ -2479,6 +3043,7 @@
       </description>
       <created by="Michael Kay" on="2012-12-06"/>
       <modified by="Abel Braaksma" on="2013-12-10" change="@html-version occured in xslt3.0 spec, stylesheet @version=3.0"/>
+      <modified by="Debbie Lockett" on="2014-08-07" change="Add error in not/any-of assertions"/>
       <environment ref="output-02"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -2488,7 +3053,10 @@
       </test>
       <result>
          <not>
-           <serialization-matches><![CDATA[<!DOCTYPE\s+html\s*>]]></serialization-matches>
+            <any-of>
+               <error code="*"/>
+               <serialization-matches><![CDATA[<!DOCTYPE\s+html\s*>]]></serialization-matches>
+            </any-of>           
          </not>            
       </result>
    </test-case>
@@ -2533,9 +3101,10 @@
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="Tim Mills" on="2013-01-29" change="all-of to any-of"/>
       <modified by="Tim Mills" on="2013-01-29" change="error to assert-serialization-error"/>
+      <modified by="Debbie Lockett" on="2014-08-06" change="spec value to XSLT20 only, see test output-0280a"/>
       <environment ref="output-01"/>
       <dependencies>
-         <spec value="XSLT20+"/>
+         <spec value="XSLT20"/>
       </dependencies>
       <test>
          <stylesheet file="output-0280.xsl"/>
@@ -2548,14 +3117,33 @@
       </result>
    </test-case>
    
+   <test-case name="output-0280a">
+      <description>Test that an error is raised on invalid @indent value ("TRUE") in xsl:output.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0280a.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
+   
    <test-case name="output-0281">
       <description>Test that an error is raised on invalid @omit-xml-declaration value in xsl:output.</description>
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="Tim Mills" on="2013-01-29" change="all-of to any-of"/>
       <modified by="Tim Mills" on="2013-01-29" change="error to assert-serialization-error"/>
+      <modified by="Debbie Lockett" on="2014-08-06" change="spec value to XSLT20 only, see test output-0281a"/>
       <environment ref="output-01"/>
       <dependencies>
-         <spec value="XSLT20+"/>
+         <spec value="XSLT20"/>
       </dependencies>
       <test>
          <stylesheet file="output-0281.xsl"/>
@@ -2568,14 +3156,33 @@
       </result>
    </test-case>
    
+   <test-case name="output-0281a">
+      <description>Test that an error is raised on invalid @omit-xml-declaration value ("YES") in xsl:output.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0281a.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
+   
    <test-case name="output-0282">
       <description>Test that an error is raised on invalid @standalone value in xsl:output.</description>
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="Tim Mills" on="2013-01-29" change="all-of to any-of"/>
       <modified by="Tim Mills" on="2013-01-29" change="error to assert-serialization-error"/>
+      <modified by="Debbie Lockett" on="2014-08-06" change="spec value to XSLT20 only, see test output-0282a"/>
       <environment ref="output-01"/>
       <dependencies>
-         <spec value="XSLT20+"/>
+         <spec value="XSLT20"/>
       </dependencies>
       <test>
          <stylesheet file="output-0282.xsl"/>
@@ -2588,14 +3195,33 @@
       </result>
    </test-case>
    
+   <test-case name="output-0282a">
+      <description>Test that an error is raised on invalid @standalone value ("TRUE") in xsl:output.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0282a.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
+   
    <test-case name="output-0283">
       <description>Test that an error is raised on invalid @undeclare-prefixes value in xsl:output.</description>
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="Tim Mills" on="2013-01-29" change="all-of to any-of"/>
       <modified by="Tim Mills" on="2013-01-29" change="error to assert-serialization-error"/>
+      <modified by="Debbie Lockett" on="2014-08-06" change="spec value to XSLT20 only, see test output-0283a"/>
       <environment ref="output-01"/>
       <dependencies>
-         <spec value="XSLT20+"/>
+         <spec value="XSLT20"/>
       </dependencies>
       <test>
          <stylesheet file="output-0283.xsl"/>
@@ -2608,6 +3234,24 @@
       </result>
    </test-case>
    
+   <test-case name="output-0283a">
+      <description>Test that an error is raised on invalid @undeclare-prefixes value ("True") in xsl:output.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0283a.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
+   
    <test-case name="output-0284">
       <description>Test that an error is raised on invalid @doctype-public value in xsl:output. See XSLT 2.0 Erratum E3</description>
       <created by="Michael Kay" on="2012-11-07"/>
@@ -2878,6 +3522,105 @@
          <error code="XTRE1620"/>
       </result>
    </test-case>
+   
+   <test-case name="output-0403">
+      <description>Test for disabling-output-escaping="true" in xsl:value-of</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-04"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0403.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output401.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0404">
+      <description>Test for disabling-output-escaping=" 1 " in xsl:value-of</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-04"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0404.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output401.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0405">
+      <description>Test for disabling-output-escaping="no" in xsl:value-of</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-04"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0405.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[&lt;p&gt;&amp;nbsp;&lt;/p&gt;]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0406">
+      <description>Test for disabling-output-escaping="false" in xsl:value-of</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-04"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0406.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[&lt;p&gt;&amp;nbsp;&lt;/p&gt;]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0407">
+      <description>Test for disabling-output-escaping="0" in xsl:value-of</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-04"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0407.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[&lt;p&gt;&amp;nbsp;&lt;/p&gt;]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0408">
+      <description>Test for disabling-output-escaping="YES" (not allowed) in xsl:value-of</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-04"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0408.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
 
    <test-case name="output-0501">
       <description>Test for missing name in xsl:character-map. Static error</description>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0101a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test escaping of non-ASCII characters in HTML output when @escape-uri-attributes=" true ".-->
+
+   <t:output method="html"
+             escape-uri-attributes=" true "
+             encoding="UTF-8"
+             indent="no"/>
+
+   <t:template match="/">
+      <html>
+         <body>
+            <t:text>
+</t:text>
+            <div>
+This is <a href="http://iri.example.org/ﭏ/årsrapport/år/2005?x=y"> escaped</a>
+            </div>
+         </body>
+      </html>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0101b.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test escaping of non-ASCII characters in HTML output when @escape-uri-attributes="1".-->
+
+   <t:output method="html"
+             escape-uri-attributes="1"
+             encoding="UTF-8"
+             indent="no"/>
+
+   <t:template match="/">
+      <html>
+         <body>
+            <t:text>
+</t:text>
+            <div>
+This is <a href="http://iri.example.org/ﭏ/årsrapport/år/2005?x=y"> escaped</a>
+            </div>
+         </body>
+      </html>
+   </t:template>
+</t:transform>
--- a/tests/decl/output/output-0106.xsl	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/decl/output/output-0106.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test with XHTML output where the stylesheet has a 
+   <!-- Purpose: Test with XHTML output where the stylesheet has a 
   				default namespace defined on the html element itself. -->
 
    <t:output method="xhtml" encoding="UTF-8" indent="yes"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0106a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test indent="true", with XHTML output where the stylesheet has a 
+  				default namespace defined on the html element itself. -->
+
+   <t:output method="xhtml" encoding="UTF-8" indent="true"/>
+
+   <t:template match="doc">
+      <html xmlns="http://www.w3.org/1999/xhtml">
+         <body>
+            <t:text>This is the body</t:text>
+         </body>
+      </html>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0106b.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test indent=" 1 ", with XHTML output where the stylesheet has a 
+  				default namespace defined on the html element itself. -->
+
+   <t:output method="xhtml" encoding="UTF-8" indent=" 1 "/>
+
+   <t:template match="doc">
+      <html xmlns="http://www.w3.org/1999/xhtml">
+         <body>
+            <t:text>This is the body</t:text>
+         </body>
+      </html>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0110a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <t:output method="xhtml" omit-xml-declaration="true" indent="no"/>
+   <!-- Purpose: Test for the xhtml output method with omit-xml-declaration="true". -->
+
+   <t:template match="/">
+      <out/>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0110b.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <t:output method="xhtml" omit-xml-declaration="1" indent="no"/>
+   <!-- Purpose: Test for the xhtml output method with omit-xml-declaration="1". -->
+
+   <t:template match="/">
+      <out/>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0116a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <t:output method="xhtml" encoding="UTF-8" indent=" false"/>
+   <!-- Purpose: Test empty elements with empty content model in XHTML output and @indent=" false". -->
+
+   <t:template match="/">
+      <html>
+         <area tabindex="2"/>
+         <base/>
+         <basefont/>
+         <br/>
+         <col/>
+         <frame/>
+         <hr width="100"/>
+         <img/>
+         <input/>
+         <isindex/>
+         <link/>
+         <meta/>
+         <param/>
+      </html>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0116b.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <t:output method="xhtml" encoding="UTF-8" indent="0"/>
+   <!-- Purpose: Test empty elements with empty content model in XHTML output and @indent="0". -->
+
+   <t:template match="/">
+      <html>
+         <area tabindex="2"/>
+         <base/>
+         <basefont/>
+         <br/>
+         <col/>
+         <frame/>
+         <hr width="100"/>
+         <img/>
+         <input/>
+         <isindex/>
+         <link/>
+         <meta/>
+         <param/>
+      </html>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0124a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <t:output method="html"
+             media-type="application/xhtml-xml"
+             include-content-type="true"/>
+   <!-- Purpose: Test HTML output with include-content-type="true", the result tree has a 'head' element.  -->
+
+   <t:template match="/">
+      <HTML>
+         <HEAD>
+  The head
+</HEAD>
+         <BODY>
+ This should have a META Tag
+</BODY>
+      </HTML>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0124b.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <t:output method="html"
+             media-type="application/xhtml-xml"
+             include-content-type=" 1 "/>
+   <!-- Purpose: Test HTML output with include-content-type=" 1 ", the result tree has a 'head' element.  -->
+
+   <t:template match="/">
+      <HTML>
+         <HEAD>
+  The head
+</HEAD>
+         <BODY>
+ This should have a META Tag
+</BODY>
+      </HTML>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0125a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <t:output method="html" include-content-type="false"/>
+   <!-- Purpose: Test HTML output with include-content-type value set to "false".  -->
+
+   <t:template match="/">
+      <HTML>
+         <HEAD>
+  The head
+</HEAD>
+         <BODY>
+ This should not have a META Tag
+</BODY>
+      </HTML>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0125b.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <t:output method="html" include-content-type="0"/>
+   <!-- Purpose: Test HTML output with include-content-type value set to "0".  -->
+
+   <t:template match="/">
+      <HTML>
+         <HEAD>
+  The head
+</HEAD>
+         <BODY>
+ This should not have a META Tag
+</BODY>
+      </HTML>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0136a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <t:output method="xhtml"
+             indent="no"
+             encoding="UTF-8"
+             byte-order-mark="true"/>
+   <!-- Purpose: Test XHTML output with @byte-order-mark=true. Encoding is UTF-8. -->
+
+   <t:template match="/">
+      <html>
+         <body>Hello</body>
+      </html>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0136b.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <t:output method="xhtml"
+             indent="no"
+             encoding="UTF-8"
+             byte-order-mark="1"/>
+   <!-- Purpose: Test XHTML output with @byte-order-mark="1". Encoding is UTF-8. -->
+
+   <t:template match="/">
+      <html>
+         <body>Hello</body>
+      </html>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0137a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="2.0">
+
+   <t:output method="xhtml"
+             indent="no"
+             encoding="UTF-8"
+             byte-order-mark=" false "/>
+   <!-- Purpose: Test XHTML output with @byte-order-mark=false. Encoding is UTF-8. -->
+
+   <t:template match="/">
+      <html>
+         <body>Hello</body>
+      </html>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0137b.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="2.0">
+
+   <t:output method="xhtml"
+             indent="no"
+             encoding="UTF-8"
+             byte-order-mark=" 0 "/>
+   <!-- Purpose: Test XHTML output with @byte-order-mark="0". Encoding is UTF-8. -->
+
+   <t:template match="/">
+      <html>
+         <body>Hello</body>
+      </html>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0141a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+<!-- Purpose: Test XHTML output with @escape-uri-attributes="false". Use fn:escape-html-uri to escape some URIs but not all. -->
+
+   <t:output method="xhtml"
+             encoding="UTF-8"
+             escape-uri-attributes="false"
+             indent="no"/>
+
+   <t:template match="/">
+      <html>
+         <body>
+            <t:text>
+</t:text>
+            <div>
+               This is 1:<a href="http://iri.example.org/ﭏ/årsrapport/år/2005?x=y">not escaped</a>
+            </div>
+            <t:text>
+</t:text>
+            <div>
+This is 2:<a>
+                  <t:attribute name="href">
+                     <t:value-of select="escape-html-uri('http://iri.example.org/ﭏ/årsrapport/år/2005?x=y')"/>
+                  </t:attribute>
+               </a>escaped</div>
+         </body>
+      </html>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0141b.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+<!-- Purpose: Test XHTML output with @escape-uri-attributes=" 0 ". Use fn:escape-html-uri to escape some URIs but not all. -->
+
+   <t:output method="xhtml"
+             encoding="UTF-8"
+             escape-uri-attributes=" 0 "
+             indent="no"/>
+
+   <t:template match="/">
+      <html>
+         <body>
+            <t:text>
+</t:text>
+            <div>
+               This is 1:<a href="http://iri.example.org/ﭏ/årsrapport/år/2005?x=y">not escaped</a>
+            </div>
+            <t:text>
+</t:text>
+            <div>
+This is 2:<a>
+                  <t:attribute name="href">
+                     <t:value-of select="escape-html-uri('http://iri.example.org/ﭏ/årsrapport/år/2005?x=y')"/>
+                  </t:attribute>
+               </a>escaped</div>
+         </body>
+      </html>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0148a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <t:output method="xhtml" omit-xml-declaration="false" indent="no"/>
+   <!-- Purpose: Test for the xhtml output method with omit-xml-declaration="false"-->
+
+   <t:template match="/">
+      <out/>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0148b.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <t:output method="xhtml" omit-xml-declaration=" 0 " indent="no"/>
+   <!-- Purpose: Test for the xhtml output method with omit-xml-declaration=" 0 "-->
+
+   <t:template match="/">
+      <out/>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0149a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <t:output method="xhtml" standalone=" true " indent="no"/>
+   <!-- Purpose: Test for the xhtml output method @standalone=" true ".-->
+
+   <t:template match="/">
+      <out/>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0149b.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <t:output method="xhtml" standalone="1" indent="no"/>
+   <!-- Purpose: Test for the xhtml output method @standalone="1".-->
+
+   <t:template match="/">
+      <out/>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0150a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <t:output method="xhtml" standalone=" false " indent="no"/>
+   <!-- Purpose: Test for the xhtml output method @standalone=" false ".-->
+
+   <t:template match="/">
+      <out/>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0150b.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <t:output method="xhtml" standalone=" 0 " indent="no"/>
+   <!-- Purpose: Test for the xhtml output method @standalone=" 0 ".-->
+
+   <t:template match="/">
+      <out/>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0176a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="true" in xsl:text -->
+
+<xsl:template match="/">
+  <html>
+    <body>
+      <xsl:text disable-output-escaping="true"><![CDATA[<p>&nbsp;</p>]]></xsl:text>
+    </body>
+  </html>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0176b.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="1" in xsl:text -->
+
+<xsl:template match="/">
+  <html>
+    <body>
+      <xsl:text disable-output-escaping="1"><![CDATA[<p>&nbsp;</p>]]></xsl:text>
+    </body>
+  </html>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0176c.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping=" no " in xsl:text -->
+
+<xsl:template match="/">
+  <html>
+    <body>
+      <xsl:text disable-output-escaping=" no "><![CDATA[<p>&nbsp;</p>]]></xsl:text>
+    </body>
+  </html>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0176d.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="false" in xsl:text -->
+
+<xsl:template match="/">
+  <html>
+    <body>
+      <xsl:text disable-output-escaping="false"><![CDATA[<p>&nbsp;</p>]]></xsl:text>
+    </body>
+  </html>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0176e.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="0" in xsl:text -->
+
+<xsl:template match="/">
+  <html>
+    <body>
+      <xsl:text disable-output-escaping="0"><![CDATA[<p>&nbsp;</p>]]></xsl:text>
+    </body>
+  </html>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0176f.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping=" " (not allowed) in xsl:text -->
+
+<xsl:template match="/">
+  <html>
+    <body>
+      <xsl:text disable-output-escaping=" "><![CDATA[<p>&nbsp;</p>]]></xsl:text>
+    </body>
+  </html>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0197a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+   <!-- Purpose: Test that an error is raised on invalid @byte-order-mark value ("TRUE") in xsl:output.-->
+
+   <t:output method="xml"
+             encoding="UTF-8"
+             indent="no"
+             byte-order-mark="TRUE"/>
+
+   <t:template match="/">
+	     <doc>hello</doc>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0198a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+   <!-- Purpose: Test that an error is raised on invalid @escape-uri-attributes value ("YES") in xsl:output.-->
+
+   <t:output method="xml"
+             encoding="UTF-8"
+             indent="no"
+             escape-uri-attributes="YES"/>
+
+   <t:template match="/">
+	     <doc>hello</doc>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0199a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test that an error is raised on invalid @include-content-type value ("TRUE") in xsl:output.-->
+
+   <t:output method="xml"
+             encoding="UTF-8"
+             indent="no"
+             include-content-type="TRUE"/>
+
+   <t:template match="/">
+	     <doc>hello</doc>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0280a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test that an error is raised on invalid @indent value ("TRUE") in xsl:output.-->
+
+   <t:output method="xml" encoding="UTF-8" indent="TRUE"/>
+
+   <t:template match="/">
+	     <doc>hello</doc>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0281a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test that an error is raised on invalid @omit-xml-declaration value ("YES") in xsl:output.-->
+
+   <t:output method="xml"
+             encoding="UTF-8"
+             indent="no"
+             omit-xml-declaration="YES"/>
+
+   <t:template match="/">
+	     <doc>hello</doc>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0282a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test that an error is raised on invalid @standalone value ("TRUE") in xsl:output.-->
+
+   <t:output method="xml" encoding="UTF-8" indent="no" standalone="TRUE"/>
+
+   <t:template match="/">
+	     <doc>hello</doc>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0283a.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test that an error is raised on invalid @undeclare-prefixes value ("True") in xsl:output.-->
+
+   <t:output method="xml"
+             version="1.1"
+             encoding="UTF-8"
+             indent="no"
+             undeclare-prefixes="True"/>
+
+   <t:template match="/">
+	     <doc>hello</doc>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0403.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="true" in xsl:value-of -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping="true"/>
+  </out>
+</xsl:template>
+
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0404.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping=" 1 " in xsl:value-of -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping=" 1 "/>
+  </out>
+</xsl:template>
+
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0405.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="2.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping=" no " in xsl:value-of -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping=" no "/>
+  </out>
+</xsl:template>
+
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0406.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="false" in xsl:value-of -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping="false"/>
+  </out>
+</xsl:template>
+
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0407.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="0" in xsl:value-of -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping="0"/>
+  </out>
+</xsl:template>
+
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0408.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="YES" (not allowed) in xsl:value-of -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping="YES"/>
+  </out>
+</xsl:template>
+
+
+</xsl:stylesheet>
--- a/tests/decl/param/_param-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/decl/param/_param-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -266,6 +266,7 @@
          template parameter that specifies required="yes".
       </description>
       <created by="Michael Kay" on="2012-10-30"/>
+      <modified by="Debbie Lockett" on="2014-08-06" change="additional error code, see bug 24864"/>
       <environment ref="param-01"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -275,7 +276,70 @@
          <initial-template name="temp"/>
       </test>
       <result>
-         <error code="XTDE0060"/>
+         <any-of>
+            <error code="XTDE0060"/>
+            <error code="XTDE0700"/>
+         </any-of>
+      </result>
+   </test-case>
+   
+   <test-case name="param-0117">
+      <description>Test the "required" attribute with values "true" and "false", using xsl:call-template instruction to set the parameter.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="param-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="param-0117.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>Required parameter;Not required parameter</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="param-0118">
+      <description>Test the "required" attribute with values "1" and "0", using xsl:call-template instruction to set the parameter.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="param-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="param-0118.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>Required parameter;Not required parameter</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="param-0119">
+      <description>Test the "required" attribute with values "TRUE" (not allowed) and "0", using xsl:call-template instruction to set the parameter.</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="param-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="param-0119.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
+   
+   <test-case name="param-0120">
+      <description> Test 3 global variables and 1 stylesheet function that reference each other, testing use of static="no", "false" and "0".</description>
+      <created by="Debbie Lockett" on="2014-08-06"/>
+      <environment ref="param-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="param-0120.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>foo</out>]]></assert-xml>
       </result>
    </test-case>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/param/param-0117.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+	<!-- Purpose: Test the "required" attribute with values "true" and "false", using xsl:call-template instruction to set the parameter. -->
+
+	<t:template match="doc">
+		<out>
+			<t:call-template name="foo">
+				<t:with-param name="par1" select="'required'"/>
+				<t:with-param name="par2" select="'notRequired'"/>
+			</t:call-template>
+		</out>
+	</t:template>
+
+	<t:template name="foo">
+		<t:param name="par1" required=" true "/>
+		<t:param name="par2" required=" false "/>
+		<t:if test="$par1 = 'required'">
+			<t:text>Required parameter;</t:text>
+		</t:if>
+		<t:if test="$par2 = 'notRequired'">
+			<t:text>Not required parameter</t:text>
+		</t:if>
+	</t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/param/param-0118.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+	<!-- Purpose: Test the "required" attribute with values "1" and "0", using xsl:call-template instruction to set the parameter. -->
+
+	<t:template match="doc">
+		<out>
+			<t:call-template name="foo">
+				<t:with-param name="par1" select="'required'"/>
+				<t:with-param name="par2" select="'notRequired'"/>
+			</t:call-template>
+		</out>
+	</t:template>
+
+	<t:template name="foo">
+		<t:param name="par1" required=" 1 "/>
+		<t:param name="par2" required=" 0 "/>
+		<t:if test="$par1 = 'required'">
+			<t:text>Required parameter;</t:text>
+		</t:if>
+		<t:if test="$par2 = 'notRequired'">
+			<t:text>Not required parameter</t:text>
+		</t:if>
+	</t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/param/param-0119.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+	<!-- Purpose: Test the "required" attribute with values "TRUE" and "0" (not allowed), using xsl:call-template instruction to set the parameter. -->
+
+	<t:template match="doc">
+		<out>
+			<t:call-template name="foo">
+				<t:with-param name="par1" select="'required'"/>
+				<t:with-param name="par2" select="'notRequired'"/>
+			</t:call-template>
+		</out>
+	</t:template>
+
+	<t:template name="foo">
+		<t:param name="par1" required="TRUE"/>
+		<t:param name="par2" required=" 0 "/>
+		<t:if test="$par1 = 'required'">
+			<t:text>Required parameter;</t:text>
+		</t:if>
+		<t:if test="$par2 = 'notRequired'">
+			<t:text>Not required parameter</t:text>
+		</t:if>
+	</t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/param/param-0120.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:foo="http://www.foo.com" xmlns:t="http://www.w3.org/1999/XSL/Transform"
+    exclude-result-prefixes="foo" version="3.0">
+    <!-- Purpose: test 3 global variables and 1 stylesheet function that reference each other, testing use of static="no", "false" and "0" -->
+
+    <t:function name="foo:a">
+        <t:value-of select="$z"/>
+    </t:function>
+
+    <t:param name="y" static="no  ">
+        <t:value-of select="foo:a()"/>
+    </t:param>
+
+    <t:param name="x" static="false ">
+        <t:value-of select="$y"/>
+    </t:param>
+
+    <t:param name="z" static=" 0">
+        <t:value-of select="'foo'"/>
+    </t:param>
+
+    <t:template match="/">
+        <out>
+            <t:value-of select="$x"/>
+        </out>
+    </t:template>
+</t:transform>
--- a/tests/fn/key/_key-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/fn/key/_key-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -1591,4 +1591,19 @@
          <assert>/out = "Amherst Auburn Cambridge Grafton Hudson Lincoln Manchester Pittsfield Rochester Salem Springfield"</assert>
       </result>
    </test-case>
+   
+   <test-case name="key-086">
+      <description>test for xsl:key, with composite="yes".</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="key105"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="key-086.xsl"/>
+      </test>
+      <result>
+         <assert>/out='3'</assert>
+      </result>
+   </test-case>
 </test-set>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/fn/key/key-086.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- Purpose: Test for xsl:key, with 'composite' attribute. -->
+
+  <xsl:key name="mykey1" match="div" use="title,p" composite="yes"/>  
+
+  <xsl:template match="doc">
+    <out>
+      <xsl:value-of select="key('mykey1',('Expressions','Exp Section') )/q"/>      
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- a/tests/insn/copy/_copy-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/insn/copy/_copy-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <test-set xmlns:xs="http://www.w3.org/2001/XMLSchema"
-          xmlns="http://www.w3.org/2012/10/xslt-test-catalog"
-          name="copy">
+   xmlns="http://www.w3.org/2012/10/xslt-test-catalog" name="copy">
    <description>Tests copy</description>
    <environment name="copy-01">
       <source role=".">
@@ -44,7 +43,7 @@
 </doc>]]></content>
       </source>
    </environment>
-   
+
    <environment name="copy-06">
       <source role=".">
          <content><![CDATA[<pink xmlns:rose="http://www.rose.com">
@@ -74,17 +73,17 @@
 </OL>]]></content>
       </source>
    </environment>
-   
+
    <environment name="copy-10">
       <source role="." file="copy-10.xml"/>
    </environment>
-   
+
    <environment name="copy-12">
       <source role=".">
          <content><![CDATA[<doc/>]]></content>
       </source>
    </environment>
-   
+
    <environment name="copy-16">
       <source role=".">
          <content><![CDATA[ 
@@ -95,7 +94,7 @@
 </doc>]]></content>
       </source>
    </environment>
-   
+
    <environment name="copy-18">
       <source role="." file="copy-18.xml"/>
    </environment>
@@ -103,7 +102,7 @@
    <environment name="copy-22">
       <source role="." file="copy-22.xml"/>
    </environment>
-   
+
    <environment name="copy-24">
       <source role="." file="copy-24.xml"/>
    </environment>
@@ -120,7 +119,7 @@
 </OL>]]></content>
       </source>
    </environment>
-   
+
    <environment name="copy-29">
       <source role=".">
          <content><![CDATA[ 
@@ -231,7 +230,7 @@
    <environment name="copy-48">
       <source role="." file="copy-48.xml"/>
    </environment>
-   
+
 
    <test-case name="copy-0101">
       <description>Test for simple identity transformation w/Template match</description>
@@ -264,7 +263,8 @@
    </test-case>
 
    <test-case name="copy-0103">
-      <description>Simple identity transformation, Result tree fragment test for xsl:copy-of</description>
+      <description>Simple identity transformation, Result tree fragment test for
+         xsl:copy-of</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-01"/>
       <dependencies>
@@ -331,7 +331,8 @@
    </test-case>
 
    <test-case name="copy-0401">
-      <description>BUG Saxon 5.5.1/010 Test that contents of xsl:copy are ignored for an attribute, comment, text node, or PI</description>
+      <description>BUG Saxon 5.5.1/010 Test that contents of xsl:copy are ignored for an attribute,
+         comment, text node, or PI</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-04"/>
       <dependencies>
@@ -350,7 +351,8 @@
    </test-case>
 
    <test-case name="copy-0501">
-      <description>Test copying of attribute from a temporary tree (docbook bug clearance) See bug 529362</description>
+      <description>Test copying of attribute from a temporary tree (docbook bug clearance) See bug
+         529362</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment>
          <source role=".">
@@ -398,11 +400,150 @@
       </result>
    </test-case>
 
+   <test-case name="copy-0603">
+      <description>test use copy-namespaces attribute of xsl:copy-of, with values " true " (with
+         some white-space), "false". (XSLT 3.0)</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="copy-06"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="copy-0603.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="copy-0601.out"/>
+      </result>
+   </test-case>
+
+   <test-case name="copy-0604">
+      <description>test use copy-namespaces attribute of xsl:copy, with values "true", "false".
+         (XSLT 3.0)</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="copy-06"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="copy-0604.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="copy-0602.out"/>
+      </result>
+   </test-case>
+
+   <test-case name="copy-0605">
+      <description>test use copy-namespaces attribute of xsl:copy-of, with values "1", "0". (XSLT
+         3.0)</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="copy-06"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="copy-0605.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="copy-0601.out"/>
+      </result>
+   </test-case>
+
+   <test-case name="copy-0606">
+      <description>test use copy-namespaces attribute of xsl:copy, with values " 1" (with some
+         white-space), "0". (XSLT 3.0)</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="copy-06"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="copy-0606.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="copy-0602.out"/>
+      </result>
+   </test-case>
+
+   <test-case name="element-0607">
+      <description> Test case that uses copy-namespaces ="TRUE" on an xsl:copy-of instruction (not
+         allowed).</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="copy-06"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="copy-0607.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
+
+   <test-case name="element-0608">
+      <description> Test case that uses copy-namespaces ="FALSE" on an xsl:copy instruction (not
+         allowed).</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="copy-06"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="copy-0608.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
+
+   <test-case name="copy-0609">
+      <description>test use inherit-namespaces="   yes  " (with whitespace) of xsl:copy. (XSLT 3.0)</description>
+      <created by="Debbie Lockett" on="2014-08-05"/>
+      <environment ref="copy-06"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="copy-0609.xsl"/>
+      </test>
+      <result>
+         <assert>//red[namespace::rose="http://www.rose.com"]</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="copy-0610">
+      <description>test use inherit-namespaces="true" of xsl:copy. (XSLT 3.0)</description>
+      <created by="Debbie Lockett" on="2014-08-05"/>
+      <environment ref="copy-06"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="copy-0610.xsl"/>
+      </test>
+      <result>
+         <assert>//red[namespace::rose="http://www.rose.com"]</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="copy-0611">
+      <description>test use inherit-namespaces="1" of xsl:copy. (XSLT 3.0)</description>
+      <created by="Debbie Lockett" on="2014-08-05"/>
+      <environment ref="copy-06"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="copy-0611.xsl"/>
+      </test>
+      <result>
+         <assert>//red[namespace::rose="http://www.rose.com"]</assert>
+      </result>
+   </test-case>
+
    <test-case name="copy-0701">
-      <description>
-      	Test for copy-of with '*' wildcard pattern. 
-      	This test also checks handling of processing instructions by copy-of.
-      </description>
+      <description> Test for copy-of with '*' wildcard pattern. This test also checks handling of
+         processing instructions by copy-of. </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment>
          <source role=".">
@@ -436,10 +577,8 @@
    </test-case>
 
    <test-case name="copy-0901">
-      <description>
-      	Use id(node-set) to try to create a set of nodes in random order. 
-      	Either id() or xsl:copy is arranging them in document order.
-      </description>
+      <description> Use id(node-set) to try to create a set of nodes in random order. Either id() or
+         xsl:copy is arranging them in document order. </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment>
          <source role="." file="copy-09.xml"/>
@@ -471,7 +610,8 @@
    </test-case>
 
    <test-case name="copy-1002">
-      <description>Another style of identity transform, where attributes are copied by copy-of rather than by recursive use of the template.</description>
+      <description>Another style of identity transform, where attributes are copied by copy-of
+         rather than by recursive use of the template.</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-10"/>
       <dependencies>
@@ -486,7 +626,8 @@
    </test-case>
 
    <test-case name="copy-1003">
-      <description>FileName: copy43 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 11.3</description>
+      <description>FileName: copy43 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 11.3</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-10"/>
       <dependencies>
@@ -504,9 +645,9 @@
       <description>Test for copy-of with union of attribute nodes.</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment>
-       <source role=".">
-         <content><![CDATA[<TEST RELEASE="R6.0"><ELEMENT x="100000"/><ELEMENT x="2" y="3" z="4"/><ELEMENT x="33333"/></TEST>]]></content>
-       </source>
+         <source role=".">
+            <content><![CDATA[<TEST RELEASE="R6.0"><ELEMENT x="100000"/><ELEMENT x="2" y="3" z="4"/><ELEMENT x="33333"/></TEST>]]></content>
+         </source>
       </environment>
       <dependencies>
          <spec value="XSLT10+"/>
@@ -520,10 +661,8 @@
    </test-case>
 
    <test-case name="copy-1201">
-      <description>
-      	Test copy-of a string constant containing character entity.
-      	With this output encoding, should get one byte of xE8 for the &amp;egrave
-      </description>
+      <description> Test copy-of a string constant containing character entity. With this output
+         encoding, should get one byte of xE8 for the &amp;egrave </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-12"/>
       <dependencies>
@@ -538,10 +677,8 @@
    </test-case>
 
    <test-case name="copy-1202">
-      <description>
-      	Test copy-of a string constant containing character entity.
-      	With this output encoding, should get two bytes (xC3,xA6) for the &amp;aelig
-      </description>
+      <description> Test copy-of a string constant containing character entity. With this output
+         encoding, should get two bytes (xC3,xA6) for the &amp;aelig </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-12"/>
       <dependencies>
@@ -554,9 +691,10 @@
          <assert-xml><![CDATA[<out>abcdæfgh</out>]]></assert-xml>
       </result>
    </test-case>
-   
+
    <test-case name="copy-1203">
-      <description>Demonstrate copying a named template from the stylesheet into the result. From a thread on XSL-list 7/30/2001.</description>
+      <description>Demonstrate copying a named template from the stylesheet into the result. From a
+         thread on XSL-list 7/30/2001.</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-12"/>
       <dependencies>
@@ -569,7 +707,7 @@
          <assert-xml file="copy-1203.out"/>
       </result>
    </test-case>
-   
+
    <test-case name="copy-1204">
       <description>Make an RTF on the fly and watch for incorrect xml-decl placement</description>
       <created by="Michael Kay" on="2012-11-07"/>
@@ -584,7 +722,7 @@
          <assert-xml><![CDATA[<out><rtf>abc<in x="yz">def</in>ghi</rtf></out>]]></assert-xml>
       </result>
    </test-case>
-   
+
    <test-case name="copy-1205">
       <description>Test xsl:copy on-empty</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -599,9 +737,10 @@
          <assert>/out/rtf = 'abc'</assert>
       </result>
    </test-case>
-   
+
    <test-case name="copy-1206">
-      <description>Test xsl:copy on-empty: check that the returned node has been copied</description>
+      <description>Test xsl:copy on-empty: check that the returned node has been
+         copied</description>
       <created by="Michael Kay" on="2013-07-30"/>
       <environment ref="copy-12"/>
       <dependencies>
@@ -614,7 +753,7 @@
          <assert>/out/@copied = 'true'</assert>
       </result>
    </test-case>
-   
+
    <test-case name="copy-1207">
       <description>Test xsl:copy on-empty: selecting empty sequence</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -629,7 +768,7 @@
          <assert>/out/rtf = 'abc'</assert>
       </result>
    </test-case>
-   
+
    <test-case name="copy-1208">
       <description>Test xsl:copy on-empty: empty document node</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -642,12 +781,12 @@
       </test>
       <result>
          <all-of>
-             <assert>/out/@p = "12"</assert>
-             <assert>empty(/out/child::node())</assert>
-         </all-of>    
+            <assert>/out/@p = "12"</assert>
+            <assert>empty(/out/child::node())</assert>
+         </all-of>
       </result>
-   </test-case>  
-   
+   </test-case>
+
    <test-case name="copy-1209">
       <description>Test xsl:copy on-empty: empty document node</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -660,12 +799,12 @@
       </test>
       <result>
          <all-of>
-             <assert>/out/@p = "12"</assert>
-             <assert>empty(/out/child::node())</assert>
-         </all-of>    
+            <assert>/out/@p = "12"</assert>
+            <assert>empty(/out/child::node())</assert>
+         </all-of>
       </result>
-   </test-case>   
-   
+   </test-case>
+
    <test-case name="copy-1210">
       <description>Test xsl:copy on-empty: content is a namespace node only</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -679,8 +818,8 @@
       <result>
          <assert>/out/rtf</assert>
       </result>
-   </test-case> 
-   
+   </test-case>
+
    <test-case name="copy-1211">
       <description>Test xsl:copy on-empty: non-empty document node</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -694,8 +833,8 @@
       <result>
          <assert>/out/a/namespace::n</assert>
       </result>
-   </test-case> 
-   
+   </test-case>
+
    <test-case name="copy-1212">
       <description>Test xsl:copy on-empty: empty comment node</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -708,12 +847,12 @@
       </test>
       <result>
          <all-of>
-             <assert>/out</assert>
-             <assert>empty(/out/node())</assert>
+            <assert>/out</assert>
+            <assert>empty(/out/node())</assert>
          </all-of>
       </result>
    </test-case>
-   
+
    <test-case name="copy-1213">
       <description>Test xsl:copy on-empty: non-empty comment node</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -726,12 +865,12 @@
       </test>
       <result>
          <all-of>
-             <assert>/out</assert>
-             <assert>/out/comment() = "Boo!"</assert>
+            <assert>/out</assert>
+            <assert>/out/comment() = "Boo!"</assert>
          </all-of>
       </result>
-   </test-case>   
-   
+   </test-case>
+
    <test-case name="copy-1214">
       <description>Test xsl:copy on-empty: empty text node</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -744,12 +883,12 @@
       </test>
       <result>
          <all-of>
-             <assert>/out</assert>
-             <assert>empty(/out/node())</assert>
+            <assert>/out</assert>
+            <assert>empty(/out/node())</assert>
          </all-of>
       </result>
    </test-case>
-   
+
    <test-case name="copy-1215">
       <description>Test xsl:copy on-empty: non-empty text node</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -762,12 +901,12 @@
       </test>
       <result>
          <all-of>
-             <assert>/out</assert>
-             <assert>/out/text() = "Boo!"</assert>
+            <assert>/out</assert>
+            <assert>/out/text() = "Boo!"</assert>
          </all-of>
       </result>
    </test-case>
-   
+
    <test-case name="copy-1216">
       <description>Test xsl:copy on-empty: empty PI node</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -780,12 +919,12 @@
       </test>
       <result>
          <all-of>
-             <assert>/out</assert>
-             <assert>empty(/out/node())</assert>
+            <assert>/out</assert>
+            <assert>empty(/out/node())</assert>
          </all-of>
       </result>
    </test-case>
-   
+
    <test-case name="copy-1217">
       <description>Test xsl:copy on-empty: non-empty PI node</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -798,12 +937,12 @@
       </test>
       <result>
          <all-of>
-             <assert>/out</assert>
-             <assert>/out/processing-instruction() = "Boo!"</assert>
+            <assert>/out</assert>
+            <assert>/out/processing-instruction() = "Boo!"</assert>
          </all-of>
       </result>
-   </test-case>  
-   
+   </test-case>
+
    <test-case name="copy-1218">
       <description>Test xsl:copy on-empty: empty attribute node</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -818,7 +957,7 @@
          <assert>/out/@y = '3'</assert>
       </result>
    </test-case>
-   
+
    <test-case name="copy-1219">
       <description>Test xsl:copy on-empty: non-empty attribute node</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -832,9 +971,9 @@
       <result>
          <assert>/out/@y = '3'</assert>
       </result>
-   </test-case>      
-   
-   
+   </test-case>
+
+
 
    <test-case name="copy-1301">
       <description>Ensure that external entity reference works in copy.</description>
@@ -854,20 +993,18 @@
    </test-case>
 
    <test-case name="copy-1401">
-      <description>
-      	Ensure that external entity reference with high-byte character works in copy. 
-      	With this output encoding, should get one byte of xBE for the &amp;frac34
-      </description>
+      <description> Ensure that external entity reference with high-byte character works in copy.
+         With this output encoding, should get one byte of xBE for the &amp;frac34 </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment>
-      <source role=".">
-         <content><![CDATA[<!DOCTYPE test [ 
+         <source role=".">
+            <content><![CDATA[<!DOCTYPE test [ 
   <!ELEMENT test (#PCDATA)> 
   <!ENTITY extEnt SYSTEM "ent22.xml">
   ]>
   <test>abcd&extEnt;fgh</test>]]></content>
-      </source>
-   </environment>
+         </source>
+      </environment>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
@@ -883,14 +1020,14 @@
       <description>Purpose: Test for copy-of text nodes including CDATA.</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment>
-      <source role=".">
-         <content><![CDATA[ 
+         <source role=".">
+            <content><![CDATA[ 
 <doc>
   <simple>abcde</simple>
   <coded>ab<![CDATA[<P>&nbsp;</P>]]]]><![CDATA[>de</coded>
 </doc>]]></content>
-      </source>
-   </environment>
+         </source>
+      </environment>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
@@ -906,7 +1043,8 @@
    </test-case>
 
    <test-case name="copy-1601">
-      <description>Test for processing-instruction() node-test in copy-of. should say "Found-pi,,Found-pi"</description>
+      <description>Test for processing-instruction() node-test in copy-of. should say
+         "Found-pi,,Found-pi"</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-16"/>
       <dependencies>
@@ -925,7 +1063,8 @@
    </test-case>
 
    <test-case name="copy-1602">
-      <description>FileName: copy24 Document: http://www.w3.org/TR/xpath DocVersion: 19991116 Section: 2.3</description>
+      <description>FileName: copy24 Document: http://www.w3.org/TR/xpath DocVersion: 19991116
+         Section: 2.3</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-16"/>
       <dependencies>
@@ -942,10 +1081,8 @@
    </test-case>
 
    <test-case name="copy-1701">
-      <description>
-      	Accumulate attributes from several places in the source. 
-      	First, get all attribute nodes under the 'a' node in the source next, get an attribute node from elsewhere
-      </description>
+      <description> Accumulate attributes from several places in the source. First, get all
+         attribute nodes under the 'a' node in the source next, get an attribute node from elsewhere </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment>
          <source role="." file="copy-17.xml"/>
@@ -1035,7 +1172,8 @@
    </test-case>
 
    <test-case name="copy-2202">
-      <description>FileName: copy40 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 11.3 Using Values of Variables &amp; Parameters with xsl:copy-of.</description>
+      <description>FileName: copy40 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 11.3 Using Values of Variables &amp; Parameters with xsl:copy-of.</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-22"/>
       <dependencies>
@@ -1112,7 +1250,8 @@
    </test-case>
 
    <test-case name="copy-2501">
-      <description>Make an RTF of the whole doc and watch for incorrect xml-decl placement.</description>
+      <description>Make an RTF of the whole doc and watch for incorrect xml-decl
+         placement.</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-25"/>
       <dependencies>
@@ -1134,7 +1273,8 @@
    </test-case>
 
    <test-case name="copy-2502">
-      <description>Make a node-set of the whole doc and watch for incorrect xml-decl placement.</description>
+      <description>Make a node-set of the whole doc and watch for incorrect xml-decl
+         placement.</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-25"/>
       <dependencies>
@@ -1190,7 +1330,16 @@
    </test-case>
 
    <test-case name="copy-2801">
-      <description>Using copy-of for repeated output of an RTF (HTML output) Source Attribution: This test was written by Michael Kay and is taken from 'XSLT Programmer's Reference' published by Wrox Press Limited in 2000; ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. Now updated in the second edition (ISBN 1-861005-06-7), http://www.wrox.com. No part of this book may be reproduced, stored in a retrieval system or transmitted in any form or by any means - electronic, electrostatic, mechanical, photocopying, recording or otherwise - without the prior written permission of the publisher, except in the case of brief quotations embodied in critical articles or reviews. Origin: copy-of/soccer.xml, copy-of/soccer.xsl, Chapter/Page: 4-185, was MK015 before</description>
+      <description>Using copy-of for repeated output of an RTF (HTML output) Source Attribution:
+         This test was written by Michael Kay and is taken from 'XSLT Programmer's Reference'
+         published by Wrox Press Limited in 2000; ISBN 1-861003-12-9; copyright Wrox Press Limited
+         2000; all rights reserved. Now updated in the second edition (ISBN 1-861005-06-7),
+         http://www.wrox.com. No part of this book may be reproduced, stored in a retrieval system
+         or transmitted in any form or by any means - electronic, electrostatic, mechanical,
+         photocopying, recording or otherwise - without the prior written permission of the
+         publisher, except in the case of brief quotations embodied in critical articles or reviews.
+         Origin: copy-of/soccer.xml, copy-of/soccer.xsl, Chapter/Page: 4-185, was MK015
+         before</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment>
          <source role="." file="copy-28.xml"/>
@@ -1207,7 +1356,8 @@
    </test-case>
 
    <test-case name="copy-2901">
-      <description>FileName: COPY41 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 11.3</description>
+      <description>FileName: COPY41 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 11.3</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-29"/>
       <dependencies>
@@ -1222,7 +1372,8 @@
    </test-case>
 
    <test-case name="copy-3001">
-      <description>FileName: copy42 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 11.3</description>
+      <description>FileName: copy42 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 11.3</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-30"/>
       <dependencies>
@@ -1237,7 +1388,8 @@
    </test-case>
 
    <test-case name="copy-3101">
-      <description>FileName: copy44 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 11.3</description>
+      <description>FileName: copy44 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 11.3</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-31"/>
       <dependencies>
@@ -1252,7 +1404,8 @@
    </test-case>
 
    <test-case name="copy-3102">
-      <description>FileName: copy46 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 11.2</description>
+      <description>FileName: copy46 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 11.2</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-31"/>
       <dependencies>
@@ -1267,7 +1420,8 @@
    </test-case>
 
    <test-case name="copy-3301">
-      <description>FileName: copy47 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 7.1.1 (and 11.3)</description>
+      <description>FileName: copy47 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 7.1.1 (and 11.3)</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-33"/>
       <dependencies>
@@ -1282,7 +1436,8 @@
    </test-case>
 
    <test-case name="copy-3302">
-      <description>FileName: copy48 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 7.1.1 (and 11.3)</description>
+      <description>FileName: copy48 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 7.1.1 (and 11.3)</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-33"/>
       <dependencies>
@@ -1297,7 +1452,8 @@
    </test-case>
 
    <test-case name="copy-3401">
-      <description>FileName: copy49 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 7.5</description>
+      <description>FileName: copy49 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 7.5</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-34"/>
       <dependencies>
@@ -1312,7 +1468,8 @@
    </test-case>
 
    <test-case name="copy-3501">
-      <description>FileName: copy51 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 7.5</description>
+      <description>FileName: copy51 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 7.5</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-35"/>
       <dependencies>
@@ -1328,7 +1485,8 @@
    </test-case>
 
    <test-case name="copy-3601">
-      <description>FileName: copy52 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 7.5</description>
+      <description>FileName: copy52 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 7.5</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-36"/>
       <dependencies>
@@ -1347,7 +1505,8 @@
    </test-case>
 
    <test-case name="copy-3602">
-      <description>FileName: copy53 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 11.3</description>
+      <description>FileName: copy53 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 11.3</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-36"/>
       <dependencies>
@@ -1362,7 +1521,8 @@
    </test-case>
 
    <test-case name="copy-3603">
-      <description>FileName: copy54 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 7.5</description>
+      <description>FileName: copy54 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 7.5</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-36"/>
       <dependencies>
@@ -1380,7 +1540,8 @@
    </test-case>
 
    <test-case name="copy-3701">
-      <description>FileName: COPY55 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 7.5</description>
+      <description>FileName: COPY55 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 7.5</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-37"/>
       <dependencies>
@@ -1417,7 +1578,8 @@
    </test-case>
 
    <test-case name="copy-3801">
-      <description>FileName: copy56 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 AdditionalSpec: http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E27</description>
+      <description>FileName: copy56 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         AdditionalSpec: http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E27</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-38"/>
       <dependencies>
@@ -1432,7 +1594,8 @@
    </test-case>
 
    <test-case name="copy-3901">
-      <description>FileName: copy57 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 AdditionalSpec: http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E27</description>
+      <description>FileName: copy57 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         AdditionalSpec: http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E27</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-39"/>
       <dependencies>
@@ -1447,7 +1610,8 @@
    </test-case>
 
    <test-case name="copy-4001">
-      <description>FileName: copy58 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 AdditionalSpec: http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E27</description>
+      <description>FileName: copy58 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         AdditionalSpec: http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E27</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-40"/>
       <dependencies>
@@ -1462,7 +1626,8 @@
    </test-case>
 
    <test-case name="copy-4101">
-      <description>FileName: copy59 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 11.3 Using Values of Variables &amp; Parameters with xsl:copy-of.</description>
+      <description>FileName: copy59 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 11.3 Using Values of Variables &amp; Parameters with xsl:copy-of.</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-41"/>
       <dependencies>
@@ -1477,7 +1642,8 @@
    </test-case>
 
    <test-case name="copy-4102">
-      <description>FileName: copy60 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 11.3 Using Values of Variables &amp; Parameters with xsl:copy-of.</description>
+      <description>FileName: copy60 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 11.3 Using Values of Variables &amp; Parameters with xsl:copy-of.</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-41"/>
       <dependencies>
@@ -1552,7 +1718,8 @@
    </test-case>
 
    <test-case name="copy-4304">
-      <description>Use xsl:copy-of within a function, which in Saxon will do a virtual copy</description>
+      <description>Use xsl:copy-of within a function, which in Saxon will do a virtual
+         copy</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-43"/>
       <dependencies>
@@ -1567,10 +1734,8 @@
    </test-case>
 
    <test-case name="copy-4305">
-      <description>
-      	Check that in a copy of a tree, axes only navigate within the subtree that was copied 
-      	&lt;xsl:variable name="cp" select="$in//c"/&gt;
-      </description>
+      <description> Check that in a copy of a tree, axes only navigate within the subtree that was
+         copied &lt;xsl:variable name="cp" select="$in//c"/&gt; </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-43"/>
       <dependencies>
@@ -1585,10 +1750,8 @@
    </test-case>
 
    <test-case name="copy-4306">
-      <description>
-      	Saxon 8.5.1 bug report from Krzysztof Nowicki. 
-      	Copying a document node followed by an element node in the sequence constructor of a new document node.
-      </description>
+      <description> Saxon 8.5.1 bug report from Krzysztof Nowicki. Copying a document node followed
+         by an element node in the sequence constructor of a new document node. </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-43"/>
       <dependencies>
@@ -1604,7 +1767,8 @@
    </test-case>
 
    <test-case name="copy-4307">
-      <description>Test xsl:copy when there is no context item. See spec bug 7624. In this example the error can be detected statically.</description>
+      <description>Test xsl:copy when there is no context item. See spec bug 7624. In this example
+         the error can be detected statically.</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-43"/>
       <dependencies>
@@ -1619,7 +1783,8 @@
    </test-case>
 
    <test-case name="copy-4308">
-      <description>Test xsl:copy when there is no context item. See spec bug 7624. In this example the error is detected dynamically.</description>
+      <description>Test xsl:copy when there is no context item. See spec bug 7624. In this example
+         the error is detected dynamically.</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-43"/>
       <dependencies>
@@ -1685,7 +1850,8 @@
    </test-case>
 
    <test-case name="copy-4601">
-      <description>FileName: COPY50 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 11.3</description>
+      <description>FileName: COPY50 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 11.3</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-46"/>
       <dependencies>
@@ -1700,7 +1866,8 @@
    </test-case>
 
    <test-case name="copy-4701">
-      <description>FileName: copy61 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 11.3</description>
+      <description>FileName: copy61 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 11.3</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-47"/>
       <dependencies>
@@ -1715,7 +1882,8 @@
    </test-case>
 
    <test-case name="copy-4702">
-      <description>FileName: copy62 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 11.3</description>
+      <description>FileName: copy62 Document: http://www.w3.org/TR/xslt DocVersion: 19991116
+         Section: 11.3</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-47"/>
       <dependencies>
@@ -1730,7 +1898,8 @@
    </test-case>
 
    <test-case name="copy-4801">
-      <description>Test for simple identity transformation w/Template match, using select attribute</description>
+      <description>Test for simple identity transformation w/Template match, using select
+         attribute</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-48"/>
       <dependencies>
@@ -1745,7 +1914,8 @@
    </test-case>
 
    <test-case name="copy-4802">
-      <description>Test for simple identity transformation w/Template match, using select attribute</description>
+      <description>Test for simple identity transformation w/Template match, using select
+         attribute</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="copy-48"/>
       <dependencies>
@@ -1805,5 +1975,5 @@
       </result>
    </test-case>
 
-  
+
 </test-set>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/copy/copy-0603.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<xsl:stylesheet version='3.0'
+xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+	<!-- test use copy-namespaces attribute of xsl:copy-of, with values " true " (with some white-space), "false". (XSLT 3.0) -->
+<?spec xslt#copy-of?>   
+<?same-as-1.0 no?>
+
+<xsl:output method="xml" encoding="utf-8"/>
+    <xsl:template match="/">
+    	<output>
+    		<with-namespaces>
+    		  <xsl:copy-of select="*" copy-namespaces=" true "/>
+    		</with-namespaces>
+    		<without-namespaces>
+    		  <xsl:copy-of select="*" copy-namespaces="false"/>
+    		</without-namespaces>    		
+    	</output>
+    </xsl:template>
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/copy/copy-0604.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,35 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<xsl:stylesheet version='3.0'
+xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+    <!-- test use copy-namespaces attribute of xsl:copy, with values "true", "false". (XSLT 3.0) -->
+<?spec xslt#shallow-copy?>   
+<?same-as-1.0 no?>
+
+<xsl:output method="xml" encoding="utf-8"/>
+    <xsl:template match="/">
+    	<output>
+    		<with-namespaces>
+    		  <xsl:apply-templates mode="copy"/>
+    		</with-namespaces>
+    		<without-namespaces>
+    		  <xsl:apply-templates mode="no-copy"/>
+    		</without-namespaces>    		
+    	</output>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="copy">
+        <xsl:copy copy-namespaces="true">
+        <xsl:copy-of select="@*"/>
+        <xsl:apply-templates mode="#current"/>
+        </xsl:copy>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="no-copy">
+        <xsl:copy copy-namespaces="false">
+        <xsl:copy-of select="@*"/>
+        <xsl:apply-templates mode="#current"/>
+        </xsl:copy>
+    </xsl:template>    
+    
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/copy/copy-0605.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<xsl:stylesheet version='3.0'
+xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+	<!-- test use copy-namespaces attribute of xsl:copy-of, with values "1", "0". (XSLT 3.0) -->
+<?spec xslt#copy-of?>   
+<?same-as-1.0 no?>
+
+<xsl:output method="xml" encoding="utf-8"/>
+    <xsl:template match="/">
+    	<output>
+    		<with-namespaces>
+    		  <xsl:copy-of select="*" copy-namespaces="1"/>
+    		</with-namespaces>
+    		<without-namespaces>
+    		  <xsl:copy-of select="*" copy-namespaces="0"/>
+    		</without-namespaces>    		
+    	</output>
+    </xsl:template>
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/copy/copy-0606.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,35 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<xsl:stylesheet version='2.0'
+xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+    <!-- test use copy-namespaces attribute of xsl:copy, with values "  1"  (with some white-space), "0". (XSLT 3.0) -->
+<?spec xslt#shallow-copy?>   
+<?same-as-1.0 no?>
+
+<xsl:output method="xml" encoding="utf-8"/>
+    <xsl:template match="/">
+    	<output>
+    		<with-namespaces>
+    		  <xsl:apply-templates mode="copy"/>
+    		</with-namespaces>
+    		<without-namespaces>
+    		  <xsl:apply-templates mode="no-copy"/>
+    		</without-namespaces>    		
+    	</output>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="copy">
+        <xsl:copy copy-namespaces="  1">
+        <xsl:copy-of select="@*"/>
+        <xsl:apply-templates mode="#current"/>
+        </xsl:copy>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="no-copy">
+        <xsl:copy copy-namespaces="0">
+        <xsl:copy-of select="@*"/>
+        <xsl:apply-templates mode="#current"/>
+        </xsl:copy>
+    </xsl:template>    
+    
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/copy/copy-0607.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<xsl:stylesheet version='3.0'
+xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+	<!-- Test case that uses copy-namespaces ="TRUE" on an xsl:copy-of instruction (not
+         allowed) -->
+<?spec xslt#copy-of?>   
+<?same-as-1.0 no?>
+
+<xsl:output method="xml" encoding="utf-8"/>
+    <xsl:template match="/">
+    	<output>
+    		<with-namespaces>
+    		  <xsl:copy-of select="*" copy-namespaces="TRUE"/>
+    		</with-namespaces>
+    		<without-namespaces>
+    		  <xsl:copy-of select="*" copy-namespaces="0"/>
+    		</without-namespaces>    		
+    	</output>
+    </xsl:template>
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/copy/copy-0608.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,36 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<xsl:stylesheet version='3.0'
+xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+    <!-- Test case that uses copy-namespaces ="FALSE" on an xsl:copy instruction (not
+         allowed) -->
+<?spec xslt#shallow-copy?>   
+<?same-as-1.0 no?>
+
+<xsl:output method="xml" encoding="utf-8"/>
+    <xsl:template match="/">
+    	<output>
+    		<with-namespaces>
+    		  <xsl:apply-templates mode="copy"/>
+    		</with-namespaces>
+    		<without-namespaces>
+    		  <xsl:apply-templates mode="no-copy"/>
+    		</without-namespaces>    		
+    	</output>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="copy">
+        <xsl:copy copy-namespaces="true">
+        <xsl:copy-of select="@*"/>
+        <xsl:apply-templates mode="#current"/>
+        </xsl:copy>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="no-copy">
+        <xsl:copy copy-namespaces="FALSE">
+        <xsl:copy-of select="@*"/>
+        <xsl:apply-templates mode="#current"/>
+        </xsl:copy>
+    </xsl:template>    
+    
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/copy/copy-0609.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+    <!-- test use inherit-namespaces="   yes  " (with whitespace) of xsl:copy (XSLT 3.0) -->
+    <?spec xslt#shallow-copy?>
+    <?same-as-1.0 no?>
+
+    <xsl:output method="xml" encoding="utf-8"/>
+    <xsl:template match="/">
+        <output>
+            <xsl:apply-templates mode="copy"/>
+        </output>
+    </xsl:template>
+
+    <xsl:template match="*" mode="copy">
+        <xsl:copy inherit-namespaces="   yes  ">
+            <xsl:copy-of select="@*"/>
+            <xsl:apply-templates mode="#current"/>
+        </xsl:copy>
+    </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/copy/copy-0610.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+    <!-- test use inherit-namespaces="true" of xsl:copy (XSLT 3.0) -->
+    <?spec xslt#shallow-copy?>
+    <?same-as-1.0 no?>
+
+    <xsl:output method="xml" encoding="utf-8"/>
+    <xsl:template match="/">
+        <output>
+            <xsl:apply-templates mode="copy"/>
+        </output>
+    </xsl:template>
+
+    <xsl:template match="*" mode="copy">
+        <xsl:copy inherit-namespaces="true">
+            <xsl:copy-of select="@*"/>
+            <xsl:apply-templates mode="#current"/>
+        </xsl:copy>
+    </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/copy/copy-0611.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+    <!-- test use inherit-namespaces="1" of xsl:copy (XSLT 3.0) -->
+    <?spec xslt#shallow-copy?>
+    <?same-as-1.0 no?>
+
+    <xsl:output method="xml" encoding="utf-8"/>
+    <xsl:template match="/">
+        <output>
+            <xsl:apply-templates mode="copy"/>
+        </output>
+    </xsl:template>
+
+    <xsl:template match="*" mode="copy">
+        <xsl:copy inherit-namespaces="1">
+            <xsl:copy-of select="@*"/>
+            <xsl:apply-templates mode="#current"/>
+        </xsl:copy>
+    </xsl:template>
+
+</xsl:stylesheet>
--- a/tests/insn/element/_element-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/insn/element/_element-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <test-set xmlns:xs="http://www.w3.org/2001/XMLSchema"
-          xmlns="http://www.w3.org/2012/10/xslt-test-catalog"
-          name="element">
-   
+   xmlns="http://www.w3.org/2012/10/xslt-test-catalog" name="element">
+
    <description>Tests the xsl:element instruction</description>
-   
+
    <environment name="element-01">
       <source role=".">
          <content><![CDATA[<doc>
@@ -15,13 +14,14 @@
 </doc>]]></content>
       </source>
    </environment>
-   
+
    <environment name="element-03">
       <source role="." file="element-03.xml"/>
    </environment>
 
    <test-case name="element-0001">
-      <description>Test that the element name is cast to a string if supplied as a QName</description>
+      <description>Test that the element name is cast to a string if supplied as a
+         QName</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -36,7 +36,8 @@
    </test-case>
 
    <test-case name="element-0002">
-      <description>Test that the element namespace is cast to a string if supplied as a anyURI</description>
+      <description>Test that the element namespace is cast to a string if supplied as a
+         anyURI</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -51,7 +52,8 @@
    </test-case>
 
    <test-case name="element-0003">
-      <description>Test that the element name is cast to a string if supplied as a dynamic QName</description>
+      <description>Test that the element name is cast to a string if supplied as a dynamic
+         QName</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -66,7 +68,8 @@
    </test-case>
 
    <test-case name="element-0004">
-      <description>Test that the element namespace is cast to a string if supplied as a dynamic anyURI</description>
+      <description>Test that the element namespace is cast to a string if supplied as a dynamic
+         anyURI</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -81,10 +84,9 @@
    </test-case>
 
    <test-case name="element-0005">
-      <description>
-         Test that the element namespace is cast to a string if supplied as a dynamic boolean 
-         (Highly artifial test, but legal XSLT, even though the results cannot be converted to canonical XML)
-      </description>
+      <description> Test that the element namespace is cast to a string if supplied as a dynamic
+         boolean (Highly artifial test, but legal XSLT, even though the results cannot be converted
+         to canonical XML) </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <dependencies>
          <spec value="XSLT20+"/>
@@ -99,7 +101,8 @@
    </test-case>
 
    <test-case name="element-0101">
-      <description>Test case that uses xsl:sequence inside xsl:element to create children and attributes for the new element.</description>
+      <description>Test case that uses xsl:sequence inside xsl:element to create children and
+         attributes for the new element.</description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="element-01"/>
       <dependencies>
@@ -114,7 +117,8 @@
    </test-case>
 
    <test-case name="element-0102">
-      <description>Test case to create a new element using xsl:element and use inherit-namespace="no".</description>
+      <description>Test case to create a new element using xsl:element and use
+         inherit-namespaces="no".</description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="element-01"/>
       <dependencies>
@@ -143,7 +147,7 @@
          <assert-xml><![CDATA[<out><name xmlns:abc="http://www.test.com"/></out>]]></assert-xml>
       </result>
    </test-case>
-   
+
    <test-case name="element-0104">
       <description>xsl:element with on-empty.</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -158,7 +162,7 @@
          <assert-xml><![CDATA[<out><one><name><e/></name></one><two/></out>]]></assert-xml>
       </result>
    </test-case>
-   
+
    <test-case name="element-0105">
       <description>xsl:element with on-empty, producing an element</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -173,7 +177,7 @@
          <assert-xml><![CDATA[<out><one><name><e/></name></one><two><jaq/></two></out>]]></assert-xml>
       </result>
    </test-case>
-   
+
    <test-case name="element-0106">
       <description>xsl:element with on-empty, with intervening document node</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -188,7 +192,7 @@
          <assert-xml><![CDATA[<out><one><name><e/></name></one><two><jaq/></two></out>]]></assert-xml>
       </result>
    </test-case>
-   
+
    <test-case name="element-0107">
       <description>xsl:element with on-empty, with intervening empty text node</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -203,7 +207,7 @@
          <assert-xml><![CDATA[<out><one><name><e/></name></one><two><jaq/></two></out>]]></assert-xml>
       </result>
    </test-case>
-   
+
    <test-case name="element-0108">
       <description>xsl:element with on-empty, value is an atomic type (not allowed)</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -218,7 +222,7 @@
          <error code="XTTE3310"/>
       </result>
    </test-case>
-   
+
    <test-case name="element-0109">
       <description>xsl:element with on-empty, value is two elements (not allowed)</description>
       <created by="Michael Kay" on="2013-07-30"/>
@@ -233,12 +237,45 @@
          <error code="XTTE3310"/>
       </result>
    </test-case>
+   
+   <test-case name="element-0110">
+      <description>Test case to create a new element using xsl:element and use inherit-namespaces="
+         false" (with some white-space). (Adapted element-0102)</description>
+      <created by="Debbie Lockett" on="2014-07-31"/>
+      <environment ref="element-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="element-0110.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><Outer xmlns="http://www.test.com"><Worth xmlns=""
+            ><e2 type="valid" value="eternity">Worth</e2></Worth></Outer></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="element-0111">
+      <description>Test case to create a new element using xsl:element and use
+         inherit-namespaces="0". (Adapted element-0102)</description>
+      <created by="Debbie Lockett" on="2014-07-31"/>
+      <environment ref="element-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="element-0111.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><Outer xmlns="http://www.test.com"><Worth xmlns=""
+            ><e2 type="valid" value="eternity">Worth</e2></Worth></Outer></out>]]></assert-xml>
+      </result>
+   </test-case>
 
    <test-case name="element-0201">
-      <description>
-         Test case that creates an element using xsl:element instruction and uses different ways 
-         (xsl:attribute instruction, xsl:call-template, xsl:copy-of) to add attributes to the newly created element.
-      </description>
+      <description> Test case that creates an element using xsl:element instruction and uses
+         different ways (xsl:attribute instruction, xsl:call-template, xsl:copy-of) to add
+         attributes to the newly created element. </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment>
          <source role=".">
@@ -276,10 +313,9 @@
    </test-case>
 
    <test-case name="element-0302">
-      <description>
-         Test case that uses xml:base in the content of a new element to verify that the base URI of the new element 
-         is the value of xml:base attribute resolved against the base URI of the xsl:element in the stylesheet.
-      </description>
+      <description> Test case that uses xml:base in the content of a new element to verify that the
+         base URI of the new element is the value of xml:base attribute resolved against the base
+         URI of the xsl:element in the stylesheet. </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="element-03"/>
       <dependencies>
@@ -294,7 +330,8 @@
    </test-case>
 
    <test-case name="element-0303">
-      <description>Test case to verify that zero-length strings result in no text node child.</description>
+      <description>Test case to verify that zero-length strings result in no text node
+         child.</description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="element-03"/>
       <dependencies>
@@ -309,7 +346,8 @@
    </test-case>
 
    <test-case name="element-0304">
-      <description>Test case to verify that adjacent strings/text nodes copied into content result in one merged text node.</description>
+      <description>Test case to verify that adjacent strings/text nodes copied into content result
+         in one merged text node.</description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="element-03"/>
       <dependencies>
@@ -327,10 +365,9 @@
    </test-case>
 
    <test-case name="element-0305">
-      <description>
-         Test case that uses inherit-namespaces = yes on an xsl:element instruction to verify that the 
-         namespace nodes are copied to the children and descendants of the newly constructed element.
-      </description>
+      <description> Test case that uses inherit-namespaces = "yes" on an xsl:element instruction to
+         verify that the namespace nodes are copied to the children and descendants of the newly
+         constructed element. </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="element-03"/>
       <dependencies>
@@ -346,13 +383,12 @@
    </test-case>
 
    <test-case name="element-0306">
-      <description>
-         Test case that uses inherit-namespaces = "yes" inherit-namespaces = "no" on different xsl:element 
-         instructions to verify the effect of the inherit-namespaces attribute on differents levels of elements 
-         (parent, child, grandchild).
-      </description>
+      <description> Test case that uses inherit-namespaces = "yes" inherit-namespaces = "no" on
+         different xsl:element instructions to verify the effect of the inherit-namespaces attribute
+         on differents levels of elements (parent, child, grandchild). </description>
       <created by="Michael Kay" on="2012-10-30"/>
-      <modified by="Michael Kay" on="2012-11-27" change="rewrote expected result to test the namespace nodes explicitly"/>
+      <modified by="Michael Kay" on="2012-11-27"
+         change="rewrote expected result to test the namespace nodes explicitly"/>
       <modified by="Abel Braaksma" on="2014-05-23" change="expected results changed: see bug 20340"/>
       <environment ref="element-03"/>
       <dependencies>
@@ -373,28 +409,35 @@
             <assert>/out/*:profession/namespace::* = "http://www.dummy_ns.com"</assert>
             <assert>/out/*:profession/namespace::* = "http://www.w3.org/XML/1998/namespace"</assert>
             <assert>count(/out/*:profession/namespace::*) = 4</assert>
-            <assert>/out/*:profession/*:IT_Architect/namespace::* = "http://www.w3.org/XML/1998/namespace"</assert>
-            <assert>/out/*:profession/*:IT_Architect/namespace::* = "http://www.dummy_ns.com"</assert>
+            <assert>/out/*:profession/*:IT_Architect/namespace::* =
+               "http://www.w3.org/XML/1998/namespace"</assert>
+            <assert>/out/*:profession/*:IT_Architect/namespace::* =
+               "http://www.dummy_ns.com"</assert>
             <assert>count(/out/*:profession/*:IT_Architect/namespace::*) = 4</assert>
-            <assert>/out/*:profession/*:IT_Specialist/namespace::* = "http://www.w3.org/XML/1998/namespace"</assert>
+            <assert>/out/*:profession/*:IT_Specialist/namespace::* =
+               "http://www.w3.org/XML/1998/namespace"</assert>
             <assert>/out/*:profession/*:IT_Specialist/namespace::* = "http://www.all.com"</assert>
             <assert>count(/out/*:profession/*:IT_Specialist/namespace::*) = 4</assert>
-            <assert>/out/*:profession/*:IT_Specialist/*:dogsbody/namespace::* = "http://www.w3.org/XML/1998/namespace"</assert>
-            <assert>/out/*:profession/*:IT_Specialist/*:dogsbody/namespace::* = "http://www.funJobs.com"</assert>
-            <assert>/out/*:profession/*:IT_Specialist/*:dogsbody/namespace::* = "http://www.easyJobs.com"</assert>
-            <assert>/out/*:profession/*:IT_Specialist/*:dogsbody/namespace::* = "http://www.dummy_ns.com"</assert>
+            <assert>/out/*:profession/*:IT_Specialist/*:dogsbody/namespace::* =
+               "http://www.w3.org/XML/1998/namespace"</assert>
+            <assert>/out/*:profession/*:IT_Specialist/*:dogsbody/namespace::* =
+               "http://www.funJobs.com"</assert>
+            <assert>/out/*:profession/*:IT_Specialist/*:dogsbody/namespace::* =
+               "http://www.easyJobs.com"</assert>
+            <assert>/out/*:profession/*:IT_Specialist/*:dogsbody/namespace::* =
+               "http://www.dummy_ns.com"</assert>
             <assert>count(/out/*:profession/*:IT_Specialist/*:dogsbody/namespace::*) = 4</assert>
-            <assert>/out/*:profession/Business_Analyst/namespace::* = "http://www.w3.org/XML/1998/namespace"</assert>
+            <assert>/out/*:profession/Business_Analyst/namespace::* =
+               "http://www.w3.org/XML/1998/namespace"</assert>
             <assert>count(/out/*:profession/Business_Analyst/namespace::*) = 3</assert>
          </all-of>
       </result>
    </test-case>
 
    <test-case name="element-0307">
-      <description>
-         Test case that uses different combinations of xsl:namespace and xmlns attribute on an xsl:element 
-         instruction with prefixed and unprefixed QNames to test the effect of the namespace on the newly created element.
-      </description>
+      <description> Test case that uses different combinations of xsl:namespace and xmlns attribute
+         on an xsl:element instruction with prefixed and unprefixed QNames to test the effect of the
+         namespace on the newly created element. </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="element-03"/>
       <dependencies>
@@ -409,10 +452,9 @@
    </test-case>
 
    <test-case name="element-0308">
-      <description>
-         Test case that creates an xsl:element and the AVT used in the name attribute delivers a result that 
-         is of type xs:QName. That will be casted to string to compute the result of the AVT.
-      </description>
+      <description> Test case that creates an xsl:element and the AVT used in the name attribute
+         delivers a result that is of type xs:QName. That will be casted to string to compute the
+         result of the AVT. </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="element-03"/>
       <dependencies>
@@ -427,10 +469,8 @@
    </test-case>
 
    <test-case name="element-0309">
-      <description>
-         Test case that uses default-validation="strip" on an xsl:stylesheet element to verify the type 
-         annotation is stripped.
-      </description>
+      <description> Test case that uses default-validation="strip" on an xsl:stylesheet element to
+         verify the type annotation is stripped. </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="element-03"/>
       <dependencies>
@@ -442,5 +482,59 @@
       <result>
          <assert-xml><![CDATA[<out>truetrue</out>]]></assert-xml>
       </result>
+   </test-case>   
+
+   <test-case name="element-0310">
+      <description> Test case that uses inherit-namespaces ="true" on an xsl:element instruction to
+         verify that the namespace nodes are copied to the children and descendants of the newly
+         constructed element. (Adapted element-0305) </description>
+      <created by="Debbie Lockett" on="2014-07-31"/>
+      <environment ref="element-03"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="namespace_axis"/>
+      </dependencies>
+      <test>
+         <stylesheet file="element-0310.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="element-0305.out"/>
+      </result>
+   </test-case>   
+
+   <test-case name="element-0311">
+      <description> Test case that uses inherit-namespaces ="1" on an xsl:element instruction to
+         verify that the namespace nodes are copied to the children and descendants of the newly
+         constructed element. (Adapted element-0305) </description>
+      <created by="Debbie Lockett" on="2014-07-31"/>
+      <environment ref="element-03"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="namespace_axis"/>
+      </dependencies>
+      <test>
+         <stylesheet file="element-0311.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="element-0305.out"/>
+      </result>
    </test-case>
+
+   <test-case name="element-0312">
+      <description> Test case that uses inherit-namespaces ="01" on an xsl:element instruction (not
+         allowed). (Adapted element-0305) </description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="element-03"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="namespace_axis"/>
+      </dependencies>
+      <test>
+         <stylesheet file="element-0312.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
+
 </test-set>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/element/element-0110.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+   <!-- Purpose: Test case to create a new element using xsl:element and use inherit-namespace="  false" (with some white-space). -->
+
+   <t:template match="doc">
+      <out>
+         <t:element name="Outer" namespace="http://www.test.com">
+            <t:element name="{data/e2}" inherit-namespaces="  false">
+               <t:sequence select="//e2"/>
+            </t:element>
+         </t:element>
+      </out>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/element/element-0111.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+   <!-- Purpose: Test case to create a new element using xsl:element and use inherit-namespace="0". -->
+
+   <t:template match="doc">
+      <out>
+         <t:element name="Outer" namespace="http://www.test.com">
+            <t:element name="{data/e2}" inherit-namespaces="0">
+               <t:sequence select="//e2"/>
+            </t:element>
+         </t:element>
+      </out>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/element/element-0310.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:fun="http://www.funJobs.com"
+             xmlns:easy="http://www.easyJobs.com"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="2.0">
+<!-- Purpose: Test case that uses inherit-namespaces = "true" on an xsl:element instruction
+  				to verify that the namespace nodes are copied to the children and descendants 
+  				of the newly constructed element -->
+
+   <t:template match="doc">
+	     <out>
+         <t:element name="profession"
+                    namespace="http://www.dummy_ns.com"
+                    inherit-namespaces="true">
+   			      <t:element name="IT_architect"/>
+   			      <t:text>
+</t:text>
+   			      <t:element name="IT_Specialist"
+                       namespace="http://www.all.com"
+                       inherit-namespaces="true">
+   				        <t:value-of select="namespace::*"/>
+   			      </t:element>
+   			      <t:text>
+</t:text>
+   			      <t:element name="Busines_Analyst"/>
+   			      <t:text>
+</t:text>
+   		    </t:element>
+         <t:text>
+</t:text>
+      </out>
+	  </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/element/element-0311.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:fun="http://www.funJobs.com"
+             xmlns:easy="http://www.easyJobs.com"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="2.0">
+<!-- Purpose: Test case that uses inherit-namespaces = "1" on an xsl:element instruction
+  				to verify that the namespace nodes are copied to the children and descendants 
+  				of the newly constructed element -->
+
+   <t:template match="doc">
+	     <out>
+         <t:element name="profession"
+                    namespace="http://www.dummy_ns.com"
+                    inherit-namespaces="1">
+   			      <t:element name="IT_architect"/>
+   			      <t:text>
+</t:text>
+   			      <t:element name="IT_Specialist"
+                       namespace="http://www.all.com"
+                       inherit-namespaces="1">
+   				        <t:value-of select="namespace::*"/>
+   			      </t:element>
+   			      <t:text>
+</t:text>
+   			      <t:element name="Busines_Analyst"/>
+   			      <t:text>
+</t:text>
+   		    </t:element>
+         <t:text>
+</t:text>
+      </out>
+	  </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/element/element-0312.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:fun="http://www.funJobs.com"
+             xmlns:easy="http://www.easyJobs.com"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="2.0">
+	<!-- Purpose: Test case that uses inherit-namespaces ="01" on an xsl:element instruction (not allowed). -->
+
+   <t:template match="doc">
+	     <out>
+         <t:element name="profession"
+                    namespace="http://www.dummy_ns.com"
+                    inherit-namespaces="01">
+   			      <t:element name="IT_architect"/>
+   			      <t:text>
+</t:text>
+   			      <t:element name="IT_Specialist"
+                       namespace="http://www.all.com"
+                       inherit-namespaces="1">
+   				        <t:value-of select="namespace::*"/>
+   			      </t:element>
+   			      <t:text>
+</t:text>
+   			      <t:element name="Busines_Analyst"/>
+   			      <t:text>
+</t:text>
+   		    </t:element>
+         <t:text>
+</t:text>
+      </out>
+	  </t:template>
+</t:transform>
--- a/tests/insn/evaluate/_evaluate-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/insn/evaluate/_evaluate-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -599,4 +599,98 @@
          <assert>/out = 'false'</assert>
       </result>
    </test-case>
+   
+   <test-case name="evaluate-034">
+      <description>Test use of schema-aware="true"</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <dependencies>
+         <spec value="XSLT30+" />
+      </dependencies>
+      <test>
+         <stylesheet file="evaluate-034.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <assert>/out = 'true'</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="evaluate-035">
+      <description>Test use of schema-aware=" false "</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <dependencies>
+         <spec value="XSLT30+" />
+      </dependencies>
+      <test>
+         <stylesheet file="evaluate-035.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <assert>/out = 'false'</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="evaluate-036">
+      <description>Test use of schema-aware="1"</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <dependencies>
+         <spec value="XSLT30+" />
+      </dependencies>
+      <test>
+         <stylesheet file="evaluate-036.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <assert>/out = 'true'</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="evaluate-037">
+      <description>Test use of schema-aware="0"</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <dependencies>
+         <spec value="XSLT30+" />
+      </dependencies>
+      <test>
+         <stylesheet file="evaluate-037.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <assert>/out = 'false'</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="evaluate-038">
+      <description>Test use of schema-aware="TRUE" (not allowed)</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <dependencies>
+         <spec value="XSLT30+" />
+      </dependencies>
+      <test>
+         <stylesheet file="evaluate-038.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
+   
+   <test-case name="evaluate-039">
+      <description>Test designed to exercise any caching done by the implementation, uses schema-aware AVT attributes which evaluate to "true" and "false"</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <dependencies>
+         <spec value="XSLT30+" />
+         <feature value="schema_aware"/>
+      </dependencies>
+      <test>
+         <stylesheet file="evaluate-039.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<Result><out>http://www.w3.org/?0</out><out>http://saxon.sf.net/#1</out
+            ><out>http://www.w3.org/?2</out><out>http://saxon.sf.net/?3</out><out>http://www.w3.org/?4</out
+            ><out>http://saxon.sf.net/?0</out><out>http://www.w3.org/?1</out><out>http://saxon.sf.net/?2</out
+            ><out>http://www.w3.org/#3</out><out>http://saxon.sf.net/?4</out></Result>]]></assert-xml>
+      </result>
+   </test-case>
 </test-set>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/evaluate/evaluate-034.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,22 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+  xmlns:e34="http://evaluate-034/" exclude-result-prefixes="xs e34">
+
+  <!-- PURPOSE test xsl:evaluate with schema-aware="true" -->
+
+  <xsl:import-schema namespace="http://evaluate-034/">
+    <xs:schema targetNamespace="http://evaluate-034/">
+      <xs:simpleType name="calendar">
+        <xs:union memberTypes="xs:date xs:time xs:dateTime"/>
+      </xs:simpleType>
+    </xs:schema>
+  </xsl:import-schema>
+  
+  <xsl:template name="main">
+    <out>
+      <xsl:evaluate schema-aware="true" xpath="'current-date() instance of e34:calendar'"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/evaluate/evaluate-035.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,26 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+  xmlns:e35="http://evaluate-035/" exclude-result-prefixes="xs e35">
+
+  <!-- PURPOSE test xsl:evaluate with schema-aware=" false " -->
+
+  <xsl:import-schema namespace="http://evaluate-035/">
+    <xs:schema targetNamespace="http://evaluate-035/">
+      <xs:simpleType name="calendar">
+        <xs:union memberTypes="xs:date xs:time xs:dateTime"/>
+      </xs:simpleType>
+    </xs:schema>
+  </xsl:import-schema>
+  
+  <xsl:template name="main">
+    <out>
+      <xsl:variable name="xpath">current-date() instance of calendar</xsl:variable>
+      <xsl:try>
+        <xsl:evaluate schema-aware=" false " xpath="$xpath"/>
+        <xsl:catch select="false()"/>
+      </xsl:try>  
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/evaluate/evaluate-036.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,22 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+  xmlns:e36="http://evaluate-036/" exclude-result-prefixes="xs e36">
+
+  <!-- PURPOSE test xsl:evaluate with schema-aware="1" -->
+
+  <xsl:import-schema namespace="http://evaluate-036/">
+    <xs:schema targetNamespace="http://evaluate-036/">
+      <xs:simpleType name="calendar">
+        <xs:union memberTypes="xs:date xs:time xs:dateTime"/>
+      </xs:simpleType>
+    </xs:schema>
+  </xsl:import-schema>
+  
+  <xsl:template name="main">
+    <out>
+      <xsl:evaluate schema-aware="1" xpath="'current-date() instance of e36:calendar'"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/evaluate/evaluate-037.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,26 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+  xmlns:e37="http://evaluate-037/" exclude-result-prefixes="xs e37">
+
+  <!-- PURPOSE test xsl:evaluate with schema-aware="0" -->
+
+  <xsl:import-schema namespace="http://evaluate-037/">
+    <xs:schema targetNamespace="http://evaluate-037/">
+      <xs:simpleType name="calendar">
+        <xs:union memberTypes="xs:date xs:time xs:dateTime"/>
+      </xs:simpleType>
+    </xs:schema>
+  </xsl:import-schema>
+  
+  <xsl:template name="main">
+    <out>
+      <xsl:variable name="xpath">current-date() instance of calendar</xsl:variable>
+      <xsl:try>
+        <xsl:evaluate schema-aware="0" xpath="$xpath"/>
+        <xsl:catch select="false()"/>
+      </xsl:try>  
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/evaluate/evaluate-038.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,22 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+  xmlns:e38="http://evaluate-038/" exclude-result-prefixes="xs e38">
+
+  <!-- PURPOSE test xsl:evaluate with schema-aware="TRUE" (not allowed) -->
+
+  <xsl:import-schema namespace="http://evaluate-038/">
+    <xs:schema targetNamespace="http://evaluate-038/">
+      <xs:simpleType name="calendar">
+        <xs:union memberTypes="xs:date xs:time xs:dateTime"/>
+      </xs:simpleType>
+    </xs:schema>
+  </xsl:import-schema>
+  
+  <xsl:template name="main">
+    <out>
+      <xsl:evaluate schema-aware="TRUE" xpath="'current-date() instance of e38:calendar'"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/evaluate/evaluate-039.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- A test designed to exercise any caching that the implementation might be doing, uses schema-aware AVT attributes which evaluate to "true" and "false" -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev39="http://example.com/evaluate39" version="3.0"
+exclude-result-prefixes="xs ev39">
+
+  <xsl:import-schema>
+    <xs:schema targetNamespace="http://example.com/evaluate039">
+      <xs:simpleType name="restrictedDate">
+        <xs:restriction base="xs:date">
+          <xs:minInclusive value="2009-01-01"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:schema>
+  </xsl:import-schema>
+  
+  <xsl:param name="path1">concat(static-base-uri(), "#", $v)</xsl:param>
+  <xsl:param name="path2">concat(static-base-uri(), "?", $v)</xsl:param>
+  
+  <xsl:template match="/" name="main">
+    <Result>
+      <xsl:for-each select="1 to 100000">
+        <xsl:variable name="r" as="xs:string">
+          <xsl:evaluate xpath="if (position() mod 7 = 0) then $path1 else $path2"
+                        base-uri="{if (position() mod 2 = 0) then 'http://www.w3.org/' else 'http://saxon.sf.net/'}"
+                        schema-aware="{if (position() mod 3 = 0) then ' true ' else 'false'}">
+             <xsl:with-param name="v" select="position() mod 5"/>
+          </xsl:evaluate>
+        </xsl:variable>
+        <xsl:if test="position() ge 90 and position() lt 100">
+            <out><xsl:value-of select="$r"/></out>
+        </xsl:if>
+      </xsl:for-each>
+    </Result>
+  </xsl:template>
+  
+</xsl:stylesheet> 
--- a/tests/insn/for-each-group/_for-each-group-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/insn/for-each-group/_for-each-group-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -689,6 +689,7 @@
    <test-case name="for-each-group-044">
       <description>XSLT 3.0 grouping using group-adjacent with composite keys</description>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-04" change="use composite='true'"/>
       <environment ref="group020"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -704,6 +705,7 @@
    <test-case name="for-each-group-045">
       <description>XSLT 3.0 grouping using group-adjacent with composite keys including NaNs</description>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-04" change="use composite='1'"/>
       <environment ref="group020"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -1147,4 +1149,79 @@
          /></out>]]></assert-xml>
       </result>
    </test-case>
+   
+   <test-case name="for-each-group-073">
+      <description>simple test of value-based grouping, with composite="no"</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="group001"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="for-each-group-073.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="for-each-group-001.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="for-each-group-074">
+      <description>simple test of value-based grouping, with composite="  false  " (with white-space)</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="group001"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="for-each-group-074.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="for-each-group-001.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="for-each-group-075">
+      <description>simple test of value-based grouping, with composite="0"</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="group001"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="for-each-group-075.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="for-each-group-001.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="for-each-group-076">
+      <description>XSLT 3.0 grouping using group-by with composite=" " (not allowed).</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="group020"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="for-each-group-076.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
+   
+   <test-case name="for-each-group-077">
+      <description>ERR XTSE1090: cannot specify composite except with group-by/adjacent</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="group020"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="for-each-group-077.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE1090"/>
+      </result>
+   </test-case>
 </test-set>
--- a/tests/insn/for-each-group/for-each-group-044.xsl	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/insn/for-each-group/for-each-group-044.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -11,7 +11,7 @@
 <out>
 	<xsl:for-each-group select="/*/city" 
 	                    group-adjacent="@country, xs:decimal(@pop)"
-	                    composite="yes">
+	                    composite="true">
 	  <group country="{current-grouping-key()[1]}" pop="{current-grouping-key()[2]}">
 	    <xsl:copy-of select="current-group()"/>
 	  </group>
--- a/tests/insn/for-each-group/for-each-group-045.xsl	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/insn/for-each-group/for-each-group-045.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -11,7 +11,7 @@
 <out>
 	<xsl:for-each-group select="1 to 30" 
 	                    group-adjacent=". idiv 2, number(concat(., 'zzz'))"
-	                    composite="yes">
+	                    composite="1">
 	  <group values="{current-group()}"/>
 	</xsl:for-each-group>
 </out>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/for-each-group/for-each-group-073.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,23 @@
+<?spec xslt#grouping?>
+<table xsl:version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <!-- simple test of value-based grouping, with composite="no" -->
+  <tr>
+    <th>Position</th>
+    <th>Country</th>
+    <th>City List</th>
+    <th>Population</th>
+  </tr>
+  <xsl:for-each-group select="cities/city" group-by="@country" composite="no">
+    <tr>
+      <td><xsl:value-of select="position()"/></td>
+      <td><xsl:value-of select="@country"/></td>
+      <td>
+        <xsl:for-each select="current-group()">
+          <xsl:value-of select="@name"/>
+          <xsl:if test="position() != last()">, </xsl:if>
+        </xsl:for-each>
+      </td>
+      <td><xsl:value-of select="sum(current-group()/@pop)"/></td>
+    </tr>
+  </xsl:for-each-group>
+</table>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/for-each-group/for-each-group-074.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,23 @@
+<?spec xslt#grouping?>
+<table xsl:version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <!-- simple test of value-based grouping, with composite="  false  " (with white-space) -->
+  <tr>
+    <th>Position</th>
+    <th>Country</th>
+    <th>City List</th>
+    <th>Population</th>
+  </tr>
+  <xsl:for-each-group select="cities/city" group-by="@country" composite="  false  ">
+    <tr>
+      <td><xsl:value-of select="position()"/></td>
+      <td><xsl:value-of select="@country"/></td>
+      <td>
+        <xsl:for-each select="current-group()">
+          <xsl:value-of select="@name"/>
+          <xsl:if test="position() != last()">, </xsl:if>
+        </xsl:for-each>
+      </td>
+      <td><xsl:value-of select="sum(current-group()/@pop)"/></td>
+    </tr>
+  </xsl:for-each-group>
+</table>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/for-each-group/for-each-group-075.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,23 @@
+<?spec xslt#grouping?>
+<table xsl:version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <!-- simple test of value-based grouping, with composite="0" -->
+  <tr>
+    <th>Position</th>
+    <th>Country</th>
+    <th>City List</th>
+    <th>Population</th>
+  </tr>
+  <xsl:for-each-group select="cities/city" group-by="@country" composite="0">
+    <tr>
+      <td><xsl:value-of select="position()"/></td>
+      <td><xsl:value-of select="@country"/></td>
+      <td>
+        <xsl:for-each select="current-group()">
+          <xsl:value-of select="@name"/>
+          <xsl:if test="position() != last()">, </xsl:if>
+        </xsl:for-each>
+      </td>
+      <td><xsl:value-of select="sum(current-group()/@pop)"/></td>
+    </tr>
+  </xsl:for-each-group>
+</table>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/for-each-group/for-each-group-076.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,22 @@
+<?spec xslt#grouping?>
+<xsl:transform 
+  version="3.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+  
+  <!-- in 3.0, group using composite=" " (not allowed) -->
+  
+<xsl:template match="/">
+<out>
+	<xsl:for-each-group select="/*/city" 
+	                    group-by="@country, xs:decimal(@pop)"
+	                    composite=" ">
+	  <group country="{current-grouping-key()[1]}" pop="{current-grouping-key()[2]}">
+	    <xsl:copy-of select="current-group()"/>
+	  </group>
+	</xsl:for-each-group>
+</out>
+</xsl:template>
+	
+</xsl:transform>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/for-each-group/for-each-group-077.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,25 @@
+<!-- ERR XTSE1090: cannot specify composite except with group-by/adjacent -->
+<?spec xslt#grouping?>
+<?error XTSE1090?>
+<table xsl:version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <tr>
+    <th>Position</th>
+    <th>Country</th>
+    <th>City List</th>
+    <th>Population</th>
+  </tr>
+  <xsl:for-each-group select="cities/city" group-starting-with="city" 
+                      composite="yes">
+    <tr>
+      <td><xsl:value-of select="position()"/></td>
+      <td><xsl:value-of select="@country"/></td>
+      <td>
+        <xsl:for-each select="current-group()">
+          <xsl:value-of select="@name"/>
+          <xsl:if test="position() != last()">, </xsl:if>
+        </xsl:for-each>
+      </td>
+      <td><xsl:value-of select="sum(current-group()/@pop)"/></td>
+    </tr>
+  </xsl:for-each-group>
+</table>
\ No newline at end of file
--- a/tests/insn/message/_message-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/insn/message/_message-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -121,6 +121,36 @@
          <error code="Q{http://www.example.com/error}my-error-code"/>
       </result>
    </test-case>
+   
+   <test-case name="message-0007">
+      <description>Test terminate="true" attribute on xsl:message element.</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="message-0007.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <error code="XTMM9000"/>
+      </result>
+   </test-case>
+   
+   <test-case name="message-0008">
+      <description>Test terminate=" 1 " attribute on xsl:message element.</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="message-0008.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <error code="XTMM9000"/>
+      </result>
+   </test-case>
 
    <test-case name="message-0101">
       <description>Test case that uses attribute value template for 'terminate' attribute of an xsl:message instruction, the value of the AVT which is the value of a parameter evalues to 'no'.</description>
@@ -141,6 +171,46 @@
          </all-of>
       </result>
    </test-case>
+   
+   <test-case name="message-0102">
+      <description>Test case that uses attribute value template for 'terminate' attribute of an xsl:message instruction, the value of the AVT which is the value of a parameter evaluates to 'false'.</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="message-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="message-0102.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <assert-xml><![CDATA[<out><not-terminated/></out>]]></assert-xml>
+            <assert-message>
+               <assert-xml><![CDATA[Terminate attribute has a value of: false]]></assert-xml>
+            </assert-message>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="message-0103">
+      <description>Test case that uses attribute value template for 'terminate' attribute of an xsl:message instruction, the value of the AVT which is the value of a parameter evaluates to '0'.</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="message-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="message-0103.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <assert-xml><![CDATA[<out><not-terminated/></out>]]></assert-xml>
+            <assert-message>
+               <assert-xml><![CDATA[Terminate attribute has a value of:  0]]></assert-xml>
+            </assert-message>
+         </all-of>
+      </result>
+   </test-case>
 
    <test-case name="message-0201">
       <description>Tests using xsl:message instruction inside xsl:element instructions.</description>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/message/message-0007.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test terminate="true" attribute on xsl:message element. -->
+
+   <t:variable name="v">
+        <a xmlns:xsl="http://www.w3.org/1999/XSL/Transform">boo</a>
+    </t:variable>
+
+   <t:template name="main">
+   		<out>
+         <t:message terminate="true">Yah boo</t:message>
+      </out>
+	  </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/message/message-0008.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test terminate=" 1 " attribute on xsl:message element. -->
+
+   <t:variable name="v">
+        <a xmlns:xsl="http://www.w3.org/1999/XSL/Transform">boo</a>
+    </t:variable>
+
+   <t:template name="main">
+   		<out>
+         <t:message terminate=" 1 ">Yah boo</t:message>
+      </out>
+	  </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/message/message-0102.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test case that uses attribute value template for 'terminate' attribute of 
+  				an xsl:message instruction, the value of the AVT which is the value of a 
+  				parameter evaluates to 'false'. -->
+
+   <t:template match="/">
+      <out>
+         <t:message select="$v" terminate="{$terminate}">
+</t:message>
+         <not-terminated/>
+      </out>
+  </t:template>
+
+   <t:param name="terminate">false</t:param>
+
+   <t:variable name="v">Terminate attribute has a value of: <t:value-of select="$terminate"/>
+   </t:variable>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/message/message-0103.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test case that uses attribute value template for 'terminate' attribute of 
+  				an xsl:message instruction, the value of the AVT which is the value of a 
+  				parameter evaluates to '0'. -->
+
+   <t:template match="/">
+      <out>
+         <t:message select="$v" terminate="{$terminate}">
+</t:message>
+         <not-terminated/>
+      </out>
+  </t:template>
+
+   <t:param name="terminate"> 0</t:param>
+
+   <t:variable name="v">Terminate attribute has a value of: <t:value-of select="$terminate"/>
+   </t:variable>
+</t:transform>
--- a/tests/insn/result-document/_result-document-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/insn/result-document/_result-document-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -35,6 +35,12 @@
       <!--Abel Braaksma: styleheet @role is restricted to be only "principal" or "secondary"-->
       <stylesheet role="principal" file="result-document-1101.xsl"/>
    </environment>
+   
+   <environment name="result-document-12">
+      <source role=".">
+         <content><![CDATA[<doc><foo> true </foo></doc>]]></content>
+      </source>
+   </environment>
 
    <test-case name="result-document-0101">
       <description>Switch to secondary output and back to primary - sequentially.</description>
@@ -861,6 +867,656 @@
          </not>
       </result>
    </test-case>
+   
+   <test-case name="result-document-0246">
+      <description>Test with xsl:result-document where value of @standalone="true".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0246.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<\?xml\s+version="1.0"\s+encoding="UTF-8"\s+standalone="yes"\?>\s*<out>hello</out>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0247">
+      <description>Test with xsl:result-document where value of @standalone=" false ".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0247.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<\?xml\s+version="1.0"\s+encoding="UTF-8"\s+standalone="no"\?>\s*<out>hello</out>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0248">
+      <description>Test with xsl:result-document where value of @standalone=" 1 ".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0248.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<\?xml\s+version="1.0"\s+encoding="UTF-8"\s+standalone="yes"\?>\s*<out>hello</out>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0249">
+      <description>Test with xsl:result-document where value of @standalone="0".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0249.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<\?xml\s+version="1.0"\s+encoding="UTF-8"\s+standalone="no"\?>\s*<out>hello</out>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0250">
+      <description>Test with xsl:result-document where value of @standalone="TRUE" (not allowed).</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0250.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0251">
+      <description>
+         Test with xsl:result-document and @omit-xml-declaration="true", @method="xml". 
+         Declaration must be omitted from the result tree.
+      </description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0251.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xml"><![CDATA[<out>hello</out>]]></assert-serialization>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0252">
+      <description>Test with xsl:result-document and @omit-xml-declaration="false". @method="xml", no @version or @encoding present, xml declaration must be written to the result tree using default attribute values.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0252.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<\?xml\s+version=['"]1.0['"]\s+encoding=['"]UTF-8['"]\?>\s*<out>hello</out>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0253">
+      <description>
+         Test with xsl:result-document and @omit-xml-declaration=" 1 ", @method="xml". 
+         Declaration must be omitted from the result tree.
+      </description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0253.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xml"><![CDATA[<out>hello</out>]]></assert-serialization>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0254">
+      <description>Test with xsl:result-document and @omit-xml-declaration="0". @method="xml", no @version or @encoding present, xml declaration must be written to the result tree using default attribute values.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0254.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<\?xml\s+version=['"]1.0['"]\s+encoding=['"]UTF-8['"]\?>\s*<out>hello</out>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0255">
+      <description>
+         Test with xsl:result-document where value of @omit-xml-declaration="01" (not allowed).
+      </description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0255.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0256">
+      <description>Test XHTML result document with @byte-order-mark="     yes   ". Encoding is UTF-8.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0256.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches><![CDATA[<\?xml]]></serialization-matches>
+            <serialization-matches><![CDATA[<html\s+xmlns="http://www.w3.org/1999/xhtml">]]></serialization-matches>
+            <serialization-matches><![CDATA[<body>hello</body>]]></serialization-matches>
+            <serialization-matches>^&#xfeff;</serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0257">
+      <description>Test XHTML result document with @byte-order-mark="no". Encoding is UTF-8.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0257.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="text" file="result-document-0257.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0258">
+      <description>Test XHTML result document with @byte-order-mark="true". Encoding is UTF-8.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0258.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches><![CDATA[<\?xml]]></serialization-matches>
+            <serialization-matches><![CDATA[<html\s+xmlns="http://www.w3.org/1999/xhtml">]]></serialization-matches>
+            <serialization-matches><![CDATA[<body>hello</body>]]></serialization-matches>
+            <serialization-matches>^&#xfeff;</serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0259">
+      <description>Test XHTML result document with @byte-order-mark="false". Encoding is UTF-8.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0259.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="text" file="result-document-0257.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0260">
+      <description>Test XHTML result document with @byte-order-mark="1". Encoding is UTF-8.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0260.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches><![CDATA[<\?xml]]></serialization-matches>
+            <serialization-matches><![CDATA[<html\s+xmlns="http://www.w3.org/1999/xhtml">]]></serialization-matches>
+            <serialization-matches><![CDATA[<body>hello</body>]]></serialization-matches>
+            <serialization-matches>^&#xfeff;</serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0261">
+      <description>Test XHTML result document with @byte-order-mark="0". Encoding is UTF-8.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0261.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="text" file="result-document-0257.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0262">
+      <description>Test XHTML result document with @byte-order-mark="00". Encoding is UTF-8.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0262.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0263">
+      <description>Test escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="yes".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0263.xsl"/>
+      </test>
+      <result>
+         <serialization-matches>href=["']http://iri.example.org/%EF%AD%8F/%C3%A5rsrapport/%C3%A5r/2005\?x=y["']</serialization-matches>         
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0264">
+      <description>Test escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="no".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0264.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<a href="http://iri.example.org/ﭏ/årsrapport/år/2005\?x=y">not escaped</a>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0265">
+      <description>Test escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="true".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0265.xsl"/>
+      </test>
+      <result>
+            <serialization-matches>href=["']http://iri.example.org/%EF%AD%8F/%C3%A5rsrapport/%C3%A5r/2005\?x=y["']</serialization-matches>         
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0266">
+      <description>Test escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="no".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0266.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<a href="http://iri.example.org/ﭏ/årsrapport/år/2005\?x=y">not escaped</a>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0267">
+      <description>Test escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="  1".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0267.xsl"/>
+      </test>
+      <result>
+            <serialization-matches>href=["']http://iri.example.org/%EF%AD%8F/%C3%A5rsrapport/%C3%A5r/2005\?x=y["']</serialization-matches>         
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0268">
+      <description>Test escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="0".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0268.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<a href="http://iri.example.org/ﭏ/årsrapport/år/2005\?x=y">not escaped</a>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0269">
+      <description>Test escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="y e s" (not allowed).</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0269.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0270">
+      <description>Test HTML output with include-content-type="yes", the result tree has a 'head' element.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0270.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches flags="i"><![CDATA[http-equiv="Content-Type"]]></serialization-matches>
+            <serialization-matches><![CDATA[="Content-Type"]]></serialization-matches>
+            <serialization-matches flags="i"><![CDATA[content="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+            <serialization-matches><![CDATA[="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+            <serialization-matches><![CDATA[<HEAD>[^<]*<[Mm][Ee][Tt][Aa][^>\\]*>[^<]*</HEAD>]]></serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0271">
+      <description>Test HTML output with include-content-type value set to " no ".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0271.xsl"/>
+      </test>
+      <result>
+         <not>
+            <any-of>
+               <error code="*"/>
+               <serialization-matches flags="i"><![CDATA[http-equiv="Content-Type"]]></serialization-matches>
+               <serialization-matches flags="i"><![CDATA[content="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+               <serialization-matches><![CDATA[<HEAD>[^<]*<[Mm][Ee][Tt][Aa][^>]*a[^<]*></HEAD>]]></serialization-matches>
+            </any-of>
+         </not>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0272">
+      <description>Test HTML output with include-content-type="true", the result tree has a 'head' element.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0272.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches flags="i"><![CDATA[http-equiv="Content-Type"]]></serialization-matches>
+            <serialization-matches><![CDATA[="Content-Type"]]></serialization-matches>
+            <serialization-matches flags="i"><![CDATA[content="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+            <serialization-matches><![CDATA[="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+            <serialization-matches><![CDATA[<HEAD>[^<]*<[Mm][Ee][Tt][Aa][^>\\]*>[^<]*</HEAD>]]></serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0273">
+      <description>Test HTML output with include-content-type value set to "false".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0273.xsl"/>
+      </test>
+      <result>
+         <not>
+            <any-of>
+               <error code="*"/>
+               <serialization-matches flags="i"><![CDATA[http-equiv="Content-Type"]]></serialization-matches>
+               <serialization-matches flags="i"><![CDATA[content="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+               <serialization-matches><![CDATA[<HEAD>[^<]*<[Mm][Ee][Tt][Aa][^>]*a[^<]*></HEAD>]]></serialization-matches>
+            </any-of>
+         </not>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0274">
+      <description>Test HTML output with include-content-type="1", the result tree has a 'head' element.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0274.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches flags="i"><![CDATA[http-equiv="Content-Type"]]></serialization-matches>
+            <serialization-matches><![CDATA[="Content-Type"]]></serialization-matches>
+            <serialization-matches flags="i"><![CDATA[content="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+            <serialization-matches><![CDATA[="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+            <serialization-matches><![CDATA[<HEAD>[^<]*<[Mm][Ee][Tt][Aa][^>\\]*>[^<]*</HEAD>]]></serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0275">
+      <description>Test HTML output with include-content-type value set to "0".</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0275.xsl"/>
+      </test>
+      <result>
+         <not>
+            <any-of>
+               <error code="*"/>
+               <serialization-matches flags="i"><![CDATA[http-equiv="Content-Type"]]></serialization-matches>
+               <serialization-matches flags="i"><![CDATA[content="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+               <serialization-matches><![CDATA[<HEAD>[^<]*<[Mm][Ee][Tt][Aa][^>]*a[^<]*></HEAD>]]></serialization-matches>
+            </any-of>
+         </not>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0276">
+      <description>Test HTML output with include-content-type="Yes" (not allowed).</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0276.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>         
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0277">
+      <description>Test indent="yes", with XHTML result document where the stylesheet has a default namespace defined on the html element itself.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0277.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<\?xml version="1.0" encoding="UTF-8"\?>\s*<html xmlns="http://www.w3.org/1999/xhtml">\s+<body>This is the body</body>\s+</html>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0278">
+      <description>Test empty elements with empty content model in XHTML output and @indent="no".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0278.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="result-document-0278.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0279">
+      <description>Test indent="true", with XHTML result document where the stylesheet has a default namespace defined on the html element itself.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0279.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<\?xml version="1.0" encoding="UTF-8"\?>\s*<html xmlns="http://www.w3.org/1999/xhtml">\s+<body>This is the body</body>\s+</html>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0280">
+      <description>Test empty elements with empty content model in XHTML output and @indent=" false".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0280.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="result-document-0278.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0281">
+      <description>Test indent="1", with XHTML result document where the stylesheet has a default namespace defined on the html element itself.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0281.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<\?xml version="1.0" encoding="UTF-8"\?>\s*<html xmlns="http://www.w3.org/1999/xhtml">\s+<body>This is the body</body>\s+</html>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0282">
+      <description>Test empty elements with empty content model in XHTML output and @indent="0".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0282.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="result-document-0278.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-0283">
+      <description>Test empty elements with empty content model in XHTML output and @indent="0".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0283.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>  
+      </result>
+   </test-case>
 
    <test-case name="result-document-0301">
       <description>Test AVT in the @method of an xsl:result-document.</description>
@@ -1276,4 +1932,105 @@
          <error code="XTDE1480"/>
       </result>
    </test-case>
+   
+   <test-case name="result-document-1201">
+      <description>Test AVT in @standalone of xsl:result-document, which evaluates to " true ".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-12"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0703.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<\?xml\s+version="1.0"\s+encoding="UTF-8"\s+standalone="yes"\?>\s*<out>hello</out>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-1202">
+      <description>Test AVT in @omit-xml-declaration of xsl:result-document, which evaluates to " true ".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-12"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-0702.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xml"><![CDATA[<out>hello</out>]]></assert-serialization>
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-1203">
+      <description>Test AVT in @byte-order-mark of xsl:result-document, which evaluates to " true ".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-12"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-1203.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches><![CDATA[<\?xml]]></serialization-matches>
+            <serialization-matches><![CDATA[<html\s+xmlns="http://www.w3.org/1999/xhtml">]]></serialization-matches>
+            <serialization-matches><![CDATA[<body>hello</body>]]></serialization-matches>
+            <serialization-matches>^&#xfeff;</serialization-matches>
+         </all-of>  
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-1204">
+      <description>Test AVT in @escape-uri-attributes of xsl:result-document, which evaluates to " true ".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-12"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-1204.xsl"/>
+      </test>
+      <result>
+         <serialization-matches>href=["']http://iri.example.org/%EF%AD%8F/%C3%A5rsrapport/%C3%A5r/2005\?x=y["']</serialization-matches>  
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-1205">
+      <description>Test AVT in @include-content-type of xsl:result-document, which evaluates to " true ".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-12"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-1205.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches flags="i"><![CDATA[http-equiv="Content-Type"]]></serialization-matches>
+            <serialization-matches><![CDATA[="Content-Type"]]></serialization-matches>
+            <serialization-matches flags="i"><![CDATA[content="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+            <serialization-matches><![CDATA[="application/xhtml-xml; charset=UTF-8"]]></serialization-matches>
+            <serialization-matches><![CDATA[<HEAD>[^<]*<[Mm][Ee][Tt][Aa][^>\\]*>[^<]*</HEAD>]]></serialization-matches>
+         </all-of>  
+      </result>
+   </test-case>
+   
+   <test-case name="result-document-1206">
+      <description>Test AVT in @indent of xsl:result-document, which evaluates to " true ".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="result-document-12"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="result-document-1206.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<\?xml version="1.0" encoding="UTF-8"\?>\s*<html xmlns="http://www.w3.org/1999/xhtml">\s+<body>This is the body</body>\s+</html>]]></serialization-matches>
+      </result>
+   </test-case>  
 </test-set>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0246.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test with xsl:result-document where value of @standalone="true".-->
+
+   <t:template match="/">
+      <t:result-document method="xml" standalone="true">
+      	  <out>hello</out>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0247.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test with xsl:result-document where value of @standalone=" false ".-->
+
+   <t:template match="/">
+      <t:result-document method="xml" standalone=" false ">
+      	  <out>hello</out>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0248.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test with xsl:result-document where value of @standalone=" 1 ".-->
+
+   <t:template match="/">
+      <t:result-document method="xml" standalone=" 1 ">
+      	  <out>hello</out>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0249.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test with xsl:result-document where value of @standalone="0".-->
+
+   <t:template match="/">
+      <t:result-document method="xml" standalone="0">
+      	  <out>hello</out>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0250.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test with xsl:result-document where value of @standalone="TRUE" (not allowed).-->
+
+   <t:template match="/">
+      <t:result-document method="xml" standalone="TRUE">
+      	  <out>hello</out>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0251.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test with xsl:result-document and @omit-xml-declaration="true", 
+  				@method="xml". Declaration must be omitted from the result tree.-->
+
+   <t:template match="/">
+  	   <t:result-document method="xml" omit-xml-declaration="true">
+      	  <out>hello</out>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0252.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test with xsl:result-document and @omit-xml-declaration="false". 
+  				@method="xml", no @version or @encoding present, xml declaration 
+  				must be written to the result tree using default attribute values.-->
+
+   <t:template match="/">
+      <t:result-document method="xml" omit-xml-declaration="false">
+         <out>hello</out>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0253.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test with xsl:result-document and @omit-xml-declaration=" 1 ", 
+  				@method="xml". Declaration must be omitted from the result tree.-->
+
+   <t:template match="/">
+  	   <t:result-document method="xml" omit-xml-declaration=" 1 ">
+      	  <out>hello</out>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0254.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test with xsl:result-document and @omit-xml-declaration="0". 
+  				@method="xml", no @version or @encoding present, xml declaration 
+  				must be written to the result tree using default attribute values.-->
+
+   <t:template match="/">
+      <t:result-document method="xml" omit-xml-declaration="0">
+         <out>hello</out>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0255.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test with xsl:result-document and @omit-xml-declaration="01" (not allowed), 
+  				@method="xml". Declaration must be omitted from the result tree.-->
+
+   <t:template match="/">
+  	   <t:result-document method="xml" omit-xml-declaration="01">
+      	  <out>hello</out>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0256.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test XHTML result document with @byte-order-mark="     yes   ". Encoding is UTF-8.-->
+
+   <t:template match="/">
+      <t:result-document method="xhtml" 
+                           indent="no" 
+                           encoding="UTF-8" 
+                           byte-order-mark="     yes   ">
+         <html>
+            <head>
+               <title/>
+            </head>
+            <body>hello</body>
+         </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0257.out	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,1 @@
+<?xml version="1.0" encoding="UTF-8"?><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title></head><body>hello</body></html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0257.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test XHTML result document with @byte-order-mark="no". Encoding is UTF-8.-->
+
+   <t:template match="/">
+      <t:result-document method="xhtml" 
+                           indent="no" 
+                           encoding="UTF-8" 
+                           byte-order-mark="no">
+         <html>
+            <head>
+               <title/>
+            </head>
+            <body>hello</body>
+         </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0258.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test XHTML result document with @byte-order-mark="true". Encoding is UTF-8.-->
+
+   <t:template match="/">
+      <t:result-document method="xhtml" 
+                           indent="no" 
+                           encoding="UTF-8" 
+                           byte-order-mark="true">
+         <html>
+            <head>
+               <title/>
+            </head>
+            <body>hello</body>
+         </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0259.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test XHTML result document with @byte-order-mark="false". Encoding is UTF-8.-->
+
+   <t:template match="/">
+      <t:result-document method="xhtml" 
+                           indent="no" 
+                           encoding="UTF-8" 
+                           byte-order-mark="false">
+         <html>
+            <head>
+               <title/>
+            </head>
+            <body>hello</body>
+         </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0260.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test XHTML result document with @byte-order-mark="1". Encoding is UTF-8.-->
+
+   <t:template match="/">
+      <t:result-document method="xhtml" 
+                           indent="no" 
+                           encoding="UTF-8" 
+                           byte-order-mark="1">
+         <html>
+            <head>
+               <title/>
+            </head>
+            <body>hello</body>
+         </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0261.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test XHTML result document with @byte-order-mark="0". Encoding is UTF-8.-->
+
+   <t:template match="/">
+      <t:result-document method="xhtml" 
+                           indent="no" 
+                           encoding="UTF-8" 
+                           byte-order-mark="0">
+         <html>
+            <head>
+               <title/>
+            </head>
+            <body>hello</body>
+         </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0262.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test XHTML result document with @byte-order-mark="00" (not allowed). Encoding is UTF-8.-->
+
+   <t:template match="/">
+      <t:result-document method="xhtml" 
+                           indent="no" 
+                           encoding="UTF-8" 
+                           byte-order-mark="00">
+         <html>
+            <head>
+               <title/>
+            </head>
+            <body>hello</body>
+         </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0263.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +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 escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="yes".-->
+
+   <t:template match="/">
+      <t:result-document method="html"
+         escape-uri-attributes="yes"
+         encoding="UTF-8"
+         indent="no">
+      <html>
+         <body>
+            <t:text>
+</t:text>
+            <div>
+This is <a href="http://iri.example.org/ﭏ/årsrapport/år/2005?x=y"> escaped</a>
+            </div>
+         </body>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0264.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +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 escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="no".-->
+
+   <t:template match="/">
+      <t:result-document method="html"
+         escape-uri-attributes="no"
+         encoding="UTF-8"
+         indent="no">
+      <html>
+         <body>
+            <t:text>
+</t:text>
+            <div>
+This is <a href="http://iri.example.org/ﭏ/årsrapport/år/2005?x=y">not escaped</a>
+            </div>
+         </body>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0265.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="true".-->
+
+   <t:template match="/">
+      <t:result-document method="html"
+         escape-uri-attributes="true"
+         encoding="UTF-8"
+         indent="no">
+      <html>
+         <body>
+            <t:text>
+</t:text>
+            <div>
+This is <a href="http://iri.example.org/ﭏ/årsrapport/år/2005?x=y"> escaped</a>
+            </div>
+         </body>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0266.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="false".-->
+
+   <t:template match="/">
+      <t:result-document method="html"
+         escape-uri-attributes="false"
+         encoding="UTF-8"
+         indent="no">
+      <html>
+         <body>
+            <t:text>
+</t:text>
+            <div>
+This is <a href="http://iri.example.org/ﭏ/årsrapport/år/2005?x=y">not escaped</a>
+            </div>
+         </body>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0267.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="  1".-->
+
+   <t:template match="/">
+      <t:result-document method="html"
+         escape-uri-attributes="  1"
+         encoding="UTF-8"
+         indent="no">
+      <html>
+         <body>
+            <t:text>
+</t:text>
+            <div>
+This is <a href="http://iri.example.org/ﭏ/årsrapport/år/2005?x=y"> escaped</a>
+            </div>
+         </body>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0268.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="0".-->
+
+   <t:template match="/">
+      <t:result-document method="html"
+         escape-uri-attributes="0"
+         encoding="UTF-8"
+         indent="no">
+      <html>
+         <body>
+            <t:text>
+</t:text>
+            <div>
+This is <a href="http://iri.example.org/ﭏ/årsrapport/år/2005?x=y">not escaped</a>
+            </div>
+         </body>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0269.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test escaping of non-ASCII characters in HTML result document when @escape-uri-attributes="y e s" (not allowed).-->
+
+   <t:template match="/">
+      <t:result-document method="html"
+         escape-uri-attributes="y e s"
+         encoding="UTF-8"
+         indent="no">
+      <html>
+         <body>
+            <t:text>
+</t:text>
+            <div>
+This is <a href="http://iri.example.org/ﭏ/årsrapport/år/2005?x=y">escaped</a>
+            </div>
+         </body>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0270.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+
+   <!-- Purpose: Test HTML result document with include-content-type="yes", the result tree has a 'head' element.  -->
+
+   <t:template match="/">
+      <t:result-document method="html" media-type="application/xhtml-xml" include-content-type="yes">
+         <HTML>
+            <HEAD> The head </HEAD>
+            <BODY> This should have a META Tag </BODY>
+         </HTML>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0271.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+
+   <!-- Purpose: Test HTML result document with include-content-type value set to " no ".  -->
+
+   <t:template match="/">
+      <t:result-document method="html" include-content-type=" no ">
+         <HTML>
+            <HEAD> The head </HEAD>
+            <BODY> This should not have a META Tag </BODY>
+         </HTML>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0272.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Purpose: Test HTML result document with include-content-type="true", the result tree has a 'head' element.  -->
+
+   <t:template match="/">
+      <t:result-document method="html" media-type="application/xhtml-xml" include-content-type="true">
+         <HTML>
+            <HEAD> The head </HEAD>
+            <BODY> This should have a META Tag </BODY>
+         </HTML>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0273.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Purpose: Test HTML result document with include-content-type value set to "false".  -->
+
+   <t:template match="/">
+      <t:result-document method="html" include-content-type="false">
+         <HTML>
+            <HEAD> The head </HEAD>
+            <BODY> This should not have a META Tag </BODY>
+         </HTML>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0274.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Purpose: Test HTML result document with include-content-type="1", the result tree has a 'head' element.  -->
+
+   <t:template match="/">
+      <t:result-document method="html" media-type="application/xhtml-xml" include-content-type="1">
+         <HTML>
+            <HEAD> The head </HEAD>
+            <BODY> This should have a META Tag </BODY>
+         </HTML>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0275.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Purpose: Test HTML result document with include-content-type value set to "0".  -->
+
+   <t:template match="/">
+      <t:result-document method="html" include-content-type="0">
+         <HTML>
+            <HEAD> The head </HEAD>
+            <BODY> This should not have a META Tag </BODY>
+         </HTML>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0276.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Purpose: Test HTML result document with include-content-type="Yes" (not allowed), the result tree has a 'head' element.  -->
+
+   <t:template match="/">
+      <t:result-document method="html" media-type="application/xhtml-xml" include-content-type="Yes">
+         <HTML>
+            <HEAD> The head </HEAD>
+            <BODY> This should have a META Tag </BODY>
+         </HTML>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0277.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+   <!-- Purpose: Test indent="yes", with XHTML result document where the stylesheet has a 
+  				default namespace defined on the html element itself. -->
+
+   <t:template match="doc">
+      <t:result-document method="xhtml" encoding="UTF-8" indent="yes">
+      <html xmlns="http://www.w3.org/1999/xhtml">
+         <body>
+            <t:text>This is the body</t:text>
+         </body>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0278.out	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,1 @@
+<?xml version="1.0" encoding="UTF-8"?><html xmlns="http://www.w3.org/1999/xhtml"><area tabindex="2" /><base /><basefont /><br /><col /><frame /><hr width="100" /><img /><input /><isindex /><link /><meta /><param /></html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0278.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="2.0">
+
+   <!-- Purpose: Test empty elements with empty content model in XHTML result document and @indent="no". -->
+
+   <t:template match="/">
+      <t:result-document method="xhtml" encoding="UTF-8" indent="no">
+      <html>
+         <area tabindex="2"/>
+         <base/>
+         <basefont/>
+         <br/>
+         <col/>
+         <frame/>
+         <hr width="100"/>
+         <img/>
+         <input/>
+         <isindex/>
+         <link/>
+         <meta/>
+         <param/>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0279.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test indent="true", with XHTML result document where the stylesheet has a 
+  				default namespace defined on the html element itself. -->
+
+   <t:template match="doc">
+      <t:result-document method="xhtml" encoding="UTF-8" indent="true">
+      <html xmlns="http://www.w3.org/1999/xhtml">
+         <body>
+            <t:text>This is the body</t:text>
+         </body>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0280.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <!-- Purpose: Test empty elements with empty content model in XHTML result document and @indent=" false". -->
+
+   <t:template match="/">
+      <t:result-document method="xhtml" encoding="UTF-8" indent=" false">
+      <html>
+         <area tabindex="2"/>
+         <base/>
+         <basefont/>
+         <br/>
+         <col/>
+         <frame/>
+         <hr width="100"/>
+         <img/>
+         <input/>
+         <isindex/>
+         <link/>
+         <meta/>
+         <param/>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0281.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test indent="1", with XHTML result document where the stylesheet has a 
+  				default namespace defined on the html element itself. -->
+
+   <t:template match="doc">
+      <t:result-document method="xhtml" encoding="UTF-8" indent="1">
+      <html xmlns="http://www.w3.org/1999/xhtml">
+         <body>
+            <t:text>This is the body</t:text>
+         </body>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0282.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="3.0">
+
+   <!-- Purpose: Test empty elements with empty content model in XHTML result document and @indent="0". -->
+
+   <t:template match="/">
+      <t:result-document method="xhtml" encoding="UTF-8" indent="0">
+      <html>
+         <area tabindex="2"/>
+         <base/>
+         <basefont/>
+         <br/>
+         <col/>
+         <frame/>
+         <hr width="100"/>
+         <img/>
+         <input/>
+         <isindex/>
+         <link/>
+         <meta/>
+         <param/>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-0283.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             version="2.0">
+
+   <!-- Purpose: Test empty elements with empty content model in XHTML result document and @indent="NO" (not allowed). -->
+
+   <t:template match="/">
+      <t:result-document method="xhtml" encoding="UTF-8" indent="NO">
+      <html>
+         <area tabindex="2"/>
+         <base/>
+         <basefont/>
+         <br/>
+         <col/>
+         <frame/>
+         <hr width="100"/>
+         <img/>
+         <input/>
+         <isindex/>
+         <link/>
+         <meta/>
+         <param/>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-1203.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test AVT in @byte-order-mark of xsl:result-document, which evaluates to " true ".-->
+
+   <t:template match="/">
+      <t:result-document method="xhtml" 
+                           indent="no" 
+                           encoding="UTF-8" 
+                           byte-order-mark="{doc/foo}">
+         <html>
+            <head>
+               <title/>
+            </head>
+            <body>hello</body>
+         </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-1204.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test AVT in @escape-uri-attributes of xsl:result-document, which evaluates to " true ".-->
+
+   <t:template match="/">
+      <t:result-document method="html"
+         escape-uri-attributes="{doc/foo}"
+         encoding="UTF-8"
+         indent="no">
+      <html>
+         <body>
+            <t:text>
+</t:text>
+            <div>
+This is <a href="http://iri.example.org/ﭏ/årsrapport/år/2005?x=y"> escaped</a>
+            </div>
+         </body>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-1205.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Purpose: Test AVT in @include-content-type of xsl:result-document, which evaluates to " true ".  -->
+
+   <t:template match="/">
+      <t:result-document method="html" media-type="application/xhtml-xml" include-content-type="{doc/foo}">
+         <HTML>
+            <HEAD> The head </HEAD>
+            <BODY> This should have a META Tag </BODY>
+         </HTML>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/result-document/result-document-1206.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test AVT in @indent of xsl:result-document, which evaluates to " true ". -->
+
+   <t:template match="/">
+      <t:result-document method="xhtml" encoding="UTF-8" indent="{doc/foo}">
+      <html xmlns="http://www.w3.org/1999/xhtml">
+         <body>
+            <t:text>This is the body</t:text>
+         </body>
+      </html>
+      </t:result-document>
+   </t:template>
+</t:transform>
--- a/tests/insn/sort/_sort-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/insn/sort/_sort-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -1346,4 +1346,80 @@
          <assert-xml><![CDATA[<out>z w r l f d a </out>]]></assert-xml>
       </result>
    </test-case>
+   
+   <test-case name="sort-074">
+      <description>Test that stable="true" can be set on an xsl:sort instruction.</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="sort129"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="sort-074.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>First,Second,Third,Fourth,Fifth,Sixth,Seventh,</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="sort-075">
+      <description>Test that stable="false" can be set, but apply to data where it's moot.</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="sort129"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="sort-075.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>First,Second,Third,Fourth,Fifth,Sixth,Seventh,</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="sort-076">
+      <description>Test that stable=" 1 " can be set on an xsl:sort instruction.</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="sort129"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="sort-076.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>First,Second,Third,Fourth,Fifth,Sixth,Seventh,</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="sort-077">
+      <description>Test that stable="0" can be set, but apply to data where it's moot.</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="sort129"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="sort-077.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>First,Second,Third,Fourth,Fifth,Sixth,Seventh,</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="sort-078">
+      <description>Test with stable="YES" (not allowed).</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="sort129"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="sort-078.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
+   
 </test-set>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/sort/sort-074.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test that stable="true" can be set on an xsl:sort instruction. -->
+
+   <t:output method="xml" encoding="UTF-8" indent="no"/>
+
+   <t:template match="/">
+      <out>
+         <t:apply-templates select="doc/alpha">
+            <t:sort select="*[1]" data-type="text" stable="true"/>
+         </t:apply-templates>
+      </out>  
+   </t:template>
+
+   <t:template match="doc/alpha">
+      <t:value-of select="display"/>
+      <t:text>,</t:text>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/sort/sort-075.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test that stable="false" can be set, but apply to data where it's moot .-->
+
+   <t:output method="xml" encoding="UTF-8" indent="no"/>
+
+   <t:template match="/">
+      <out>
+         <t:apply-templates select="doc/alpha">
+            <t:sort select="*[1]" data-type="text" stable="false"/>
+         </t:apply-templates>
+      </out>  
+   </t:template>
+
+   <t:template match="doc/alpha">
+      <t:value-of select="display"/>
+      <t:text>,</t:text>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/sort/sort-076.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test that stable=" 1 " can be set on an xsl:sort instruction. -->
+
+   <t:output method="xml" encoding="UTF-8" indent="no"/>
+
+   <t:template match="/">
+      <out>
+         <t:apply-templates select="doc/alpha">
+            <t:sort select="*[1]" data-type="text" stable=" 1 "/>
+         </t:apply-templates>
+      </out>  
+   </t:template>
+
+   <t:template match="doc/alpha">
+      <t:value-of select="display"/>
+      <t:text>,</t:text>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/sort/sort-077.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Test that stable="0" can be set, but apply to data where it's moot .-->
+
+   <t:output method="xml" encoding="UTF-8" indent="no"/>
+
+   <t:template match="/">
+      <out>
+         <t:apply-templates select="doc/alpha">
+            <t:sort select="*[1]" data-type="text" stable="0"/>
+         </t:apply-templates>
+      </out>  
+   </t:template>
+
+   <t:template match="doc/alpha">
+      <t:value-of select="display"/>
+      <t:text>,</t:text>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/sort/sort-078.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+   <!-- Purpose: Test with stable="YES" (not allowed).-->
+
+   <t:output method="xml" encoding="UTF-8" indent="no"/>
+
+   <t:template match="/">
+      <out>
+         <t:apply-templates select="doc/alpha">
+            <t:sort select="*[1]" data-type="text" stable="YES"/>
+         </t:apply-templates>
+      </out>  
+   </t:template>
+
+   <t:template match="doc/alpha">
+      <t:value-of select="display"/>
+      <t:text>,</t:text>
+   </t:template>
+</t:transform>
--- a/tests/misc/xml-version/_xml-version-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/misc/xml-version/_xml-version-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -563,4 +563,220 @@
          <assert-serialization-error code="SERE0006"/>
       </result>
    </test-case>
+   
+   <test-case name="xml-version-031">
+      <description>See if a namespace undeclaration (using undeclare-prefixes="true") in a stylesheet works.</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="xml-version-06"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="xml-version-031.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches>version=['"]1.1['"]</serialization-matches>
+            <serialization-matches>xmlns:a=(""|'')</serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="xml-version-032">
+      <description>See if a namespace undeclaration (using undeclare-prefixes=" 1 ") in a stylesheet works.</description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="xml-version-06"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="xml-version-032.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches>version=['"]1.1['"]</serialization-matches>
+            <serialization-matches>xmlns:a=(""|'')</serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="xml-version-033">
+      <description>
+         Tests undeclare-prefixes="false" on xsl:output element where the method is 'xml' 
+         and version is '1.1', the namespace is an IRI.
+      </description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="xml-version-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="xml-version-033.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><a xmlns:pref="http://example.org/pre&#xC0;"><b/></a></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="xml-version-034">
+      <description>
+         Tests undeclare-prefixes="0" on xsl:output element where the method is 'xml' 
+         and version is '1.1', the namespace is an IRI.
+      </description>
+      <created by="Debbie Lockett" on="2014-08-07"/>
+      <environment ref="xml-version-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="xml-version-034.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><a xmlns:pref="http://example.org/pre&#xC0;"><b/></a></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="xml-version-035">
+      <description>See if a namespace undeclaration (using undeclare-prefixes="yes" on xsl:result-document) in a stylesheet works.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="xml-version-06"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="xml-version-035.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches>version=['"]1.1['"]</serialization-matches>
+            <serialization-matches>xmlns:a=(""|'')</serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="xml-version-036">
+      <description>
+         Tests undeclare-prefixes=" no " on xsl:result-document element where the method is 'xml' 
+         and version is '1.1', the namespace is an IRI.
+      </description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="xml-version-02"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="xml-version-036.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><a xmlns:pref="http://example.org/pre&#xC0;"><b/></a></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="xml-version-037">
+      <description>See if a namespace undeclaration (using undeclare-prefixes="true" on xsl:result-document) in a stylesheet works.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="xml-version-06"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="xml-version-037.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches>version=['"]1.1['"]</serialization-matches>
+            <serialization-matches>xmlns:a=(""|'')</serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="xml-version-038">
+      <description>
+         Tests undeclare-prefixes="false" on xsl:result-document element where the method is 'xml' 
+         and version is '1.1', the namespace is an IRI.
+      </description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="xml-version-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="xml-version-038.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><a xmlns:pref="http://example.org/pre&#xC0;"><b/></a></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="xml-version-039">
+      <description>See if a namespace undeclaration (using undeclare-prefixes="1" on xsl:result-document) in a stylesheet works.</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="xml-version-06"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="xml-version-039.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches>version=['"]1.1['"]</serialization-matches>
+            <serialization-matches>xmlns:a=(""|'')</serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="xml-version-040">
+      <description>
+         Tests undeclare-prefixes="0" on xsl:result-document element where the method is 'xml' 
+         and version is '1.1', the namespace is an IRI.
+      </description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="xml-version-02"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="xml-version-040.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><a xmlns:pref="http://example.org/pre&#xC0;"><b/></a></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="xml-version-041">
+      <description>See if a namespace undeclaration (using undeclare-prefixes="T" on xsl:result-document) in a stylesheet works (not allowed).</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="xml-version-06"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="xml-version-041.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
+   
+   <test-case name="xml-version-042">
+      <description>Test AVT in @undeclare-prefixes of xsl:result-document, which evaluates to " yes ".</description>
+      <created by="Debbie Lockett" on="2014-08-11"/>
+      <environment ref="xml-version-06"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="xml-version-042.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <serialization-matches>version=['"]1.1['"]</serialization-matches>
+            <serialization-matches>xmlns:a=(""|'')</serialization-matches>
+         </all-of>
+      </result>
+   </test-case>
 </test-set>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/xml-version/xml-version-031.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.1"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- PURPOSE: See if a namespace undeclaration (using undeclare-prefixes="true") in a stylesheet works -->
+
+<xsl:output method="xml" version="1.1" undeclare-prefixes="true"/>
+
+<xsl:template match="/">
+  <doc xmlns:a="http://a/" xsl:inherit-namespaces="no">
+    <chap xsl:inherit-namespaces="no">
+      <para/>
+      <para xmlns:a=""/>
+    </chap>
+  </doc>
+</xsl:template>
+ 
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/xml-version/xml-version-032.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.1"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- PURPOSE: See if a namespace undeclaration (using undeclare-prefixes=" 1 ") in a stylesheet works -->
+
+<xsl:output method="xml" version="1.1" undeclare-prefixes=" 1 "/>
+
+<xsl:template match="/">
+  <doc xmlns:a="http://a/" xsl:inherit-namespaces="no">
+    <chap xsl:inherit-namespaces="no">
+      <para/>
+      <para xmlns:a=""/>
+    </chap>
+  </doc>
+</xsl:template>
+ 
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/xml-version/xml-version-033.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Tests undeclare-prefixes="false" on xsl:output element where the method is 'xml' and version is '1.1', the namespace is an IRI.  -->
+
+   <t:output method="xml" version="1.1" undeclare-prefixes="false"/>
+
+   <t:template match="/">
+		    <out>
+         <t:element name="a" inherit-namespaces="yes">
+	    		     <t:namespace name="pref">http://example.org/preÀ</t:namespace>
+	    		     <t:element name="b"/>
+	  		    </t:element>
+      </out>
+	  </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/xml-version/xml-version-034.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Tests undeclare-prefixes="0" on xsl:output element where the method is 'xml' and version is '1.1', the namespace is an IRI.  -->
+
+   <t:output method="xml" version="1.1" undeclare-prefixes="0"/>
+
+   <t:template match="/">
+		    <out>
+         <t:element name="a" inherit-namespaces="yes">
+	    		     <t:namespace name="pref">http://example.org/preÀ</t:namespace>
+	    		     <t:element name="b"/>
+	  		    </t:element>
+      </out>
+	  </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/xml-version/xml-version-035.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.1"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- PURPOSE: See if a namespace undeclaration (using undeclare-prefixes="yes" on xsl:result-document) in a stylesheet works -->
+
+<xsl:template match="/">
+  <xsl:result-document method="xml" version="1.1" undeclare-prefixes="yes">
+  <doc xmlns:a="http://a/" xsl:inherit-namespaces="no">
+    <chap xsl:inherit-namespaces="no">
+      <para/>
+      <para xmlns:a=""/>
+    </chap>
+  </doc>
+  </xsl:result-document>
+</xsl:template>
+ 
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/xml-version/xml-version-036.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Tests undeclare-prefixes=" no " on xsl:result-document element where the method is 'xml' and version is '1.1', the namespace is an IRI.  -->
+
+   <t:template match="/">
+   	<t:result-document method="xml" version="1.1" undeclare-prefixes=" no ">
+		    <out>
+         <t:element name="a" inherit-namespaces="yes">
+	    		     <t:namespace name="pref">http://example.org/preÀ</t:namespace>
+	    		     <t:element name="b"/>
+	  		    </t:element>
+      </out>
+   	</t:result-document>
+	  </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/xml-version/xml-version-037.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.1"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- PURPOSE: See if a namespace undeclaration (using undeclare-prefixes="true" on xsl:result-document) in a stylesheet works -->
+
+<xsl:template match="/">
+  <xsl:result-document method="xml" version="1.1" undeclare-prefixes="true">
+  <doc xmlns:a="http://a/" xsl:inherit-namespaces="no">
+    <chap xsl:inherit-namespaces="no">
+      <para/>
+      <para xmlns:a=""/>
+    </chap>
+  </doc>
+  </xsl:result-document>
+</xsl:template>
+ 
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/xml-version/xml-version-038.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Tests undeclare-prefixes="false" on xsl:result-document element where the method is 'xml' and version is '1.1', the namespace is an IRI.  -->
+
+   <t:template match="/">
+   	<t:result-document method="xml" version="1.1" undeclare-prefixes="false">
+		    <out>
+         <t:element name="a" inherit-namespaces="yes">
+	    		     <t:namespace name="pref">http://example.org/preÀ</t:namespace>
+	    		     <t:element name="b"/>
+	  		    </t:element>
+      </out>
+   	</t:result-document>
+	  </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/xml-version/xml-version-039.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.1"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- PURPOSE: See if a namespace undeclaration (using undeclare-prefixes="1" on xsl:result-document) in a stylesheet works -->
+
+<xsl:template match="/">
+  <xsl:result-document method="xml" version="1.1" undeclare-prefixes="1">
+  <doc xmlns:a="http://a/" xsl:inherit-namespaces="no">
+    <chap xsl:inherit-namespaces="no">
+      <para/>
+      <para xmlns:a=""/>
+    </chap>
+  </doc>
+  </xsl:result-document>
+</xsl:template>
+ 
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/xml-version/xml-version-040.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="3.0">
+<!-- Purpose: Tests undeclare-prefixes="0" on xsl:result-document element where the method is 'xml' and version is '1.1', the namespace is an IRI.  -->
+
+   <t:template match="/">
+   	<t:result-document method="xml" version="1.1" undeclare-prefixes="0">
+		    <out>
+         <t:element name="a" inherit-namespaces="yes">
+	    		     <t:namespace name="pref">http://example.org/preÀ</t:namespace>
+	    		     <t:element name="b"/>
+	  		    </t:element>
+      </out>
+   	</t:result-document>
+	  </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/xml-version/xml-version-041.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.1"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- PURPOSE: See if a namespace undeclaration (using undeclare-prefixes="T" on xsl:result-document) in a stylesheet works (not allowed) -->
+
+<xsl:template match="/">
+  <xsl:result-document method="xml" version="1.1" undeclare-prefixes="T">
+  <doc xmlns:a="http://a/" xsl:inherit-namespaces="no">
+    <chap xsl:inherit-namespaces="no">
+      <para/>
+      <para xmlns:a=""/>
+    </chap>
+  </doc>
+  </xsl:result-document>
+</xsl:template>
+ 
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/xml-version/xml-version-042.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.1"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+
+  <!-- PURPOSE: Test AVT in @undeclare-prefixes of xsl:result-document, which evaluates to " yes ". -->
+
+<xsl:param name="yes"> yes </xsl:param>
+
+<xsl:template match="/">
+  <xsl:result-document method="xml" version="1.1" undeclare-prefixes="{$yes}">
+  <doc xmlns:a="http://a/" xsl:inherit-namespaces="no">
+    <chap xsl:inherit-namespaces="no">
+      <para/>
+      <para xmlns:a=""/>
+    </chap>
+  </doc>
+  </xsl:result-document>
+</xsl:template>
+ 
+</xsl:stylesheet>
--- a/tests/type/namespace/_namespace-test-set.xml	Tue Aug 12 10:03:15 2014 +0100
+++ b/tests/type/namespace/_namespace-test-set.xml	Tue Aug 12 10:05:04 2014 +0100
@@ -1360,7 +1360,7 @@
    </test-case>
 
    <test-case name="namespace-2614">
-      <description>Modified example taken from the example "Confilicting Namespace Prefixes" in section 11.7 of the spec exclude-result-prefixes added. This should not generate an error (namespace fixup should invent a prefix)</description>
+      <description>Modified example taken from the example "Conflicting Namespace Prefixes" in section 11.7 of the spec exclude-result-prefixes added. This should not generate an error (namespace fixup should invent a prefix)</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="namespace-26"/>
       <dependencies>
@@ -1420,7 +1420,7 @@
    </test-case>
 
    <test-case name="namespace-2618">
-      <description>Incorrect example taken from the example "Confilicting Namespace Prefixes" in section 11.7 of the spec This should generate an error (two conflicting namespace nodes). Corrected versions in nspc70 and nspc71</description>
+      <description>Incorrect example taken from the example "Conflicting Namespace Prefixes" in section 11.7 of the spec This should generate an error (two conflicting namespace nodes). Corrected versions in nspc70 and nspc71</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="namespace-26"/>
       <dependencies>
@@ -1510,6 +1510,54 @@
          <error code="XTDE0920"/>
       </result>
    </test-case>
+   
+   <test-case name="namespace-2625">
+      <description>test inherit-namespaces="false" on xsl:copy</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="namespace-26"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="XML_1.1"/>
+      </dependencies>
+      <test>
+         <stylesheet file="namespace-2625.xsl"/>
+      </test>
+      <result>
+         <assert-xml xml-version="1.1"><![CDATA[<n:a xmlns="http://d/" xmlns:n="http://n/"><n:b xmlns:n="http://n2/" xmlns=""/><c xmlns="http://n3/" xmlns:n=""/></n:a>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="namespace-2626">
+      <description>test inherit-namespaces="  0" on xsl:copy</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="namespace-26"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="XML_1.1"/>
+      </dependencies>
+      <test>
+         <stylesheet file="namespace-2626.xsl"/>
+      </test>
+      <result>
+         <assert-xml xml-version="1.1"><![CDATA[<n:a xmlns="http://d/" xmlns:n="http://n/"><n:b xmlns:n="http://n2/" xmlns=""/><c xmlns="http://n3/" xmlns:n=""/></n:a>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="namespace-2627">
+      <description>test inherit-namespaces="FALSE" on xsl:copy (not allowed)</description>
+      <created by="Debbie Lockett" on="2014-08-04"/>
+      <environment ref="namespace-26"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="XML_1.1"/>
+      </dependencies>
+      <test>
+         <stylesheet file="namespace-2627.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
 
    <test-case name="namespace-2701">
       <description>Identity template (using an unusual namespace prefix)</description>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/type/namespace/namespace-2625.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<!-- test inherit-namespaces="false" on xsl:copy -->
+
+
+<xsl:output method="xml" version="1.1" undeclare-prefixes="yes"/>
+
+<xsl:template match = "/">
+  <xsl:variable name="e" as="element()">
+    <n:a xmlns:n="http://n/" xmlns="http://d/"/>
+  </xsl:variable>
+  <xsl:for-each select="$e">
+    <xsl:copy inherit-namespaces="false">
+      <xsl:call-template name="c"/>
+    </xsl:copy>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template name="c">
+  <n:b xmlns:n="http://n2/"/>
+  <c xmlns="http://n3/"/>  
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/type/namespace/namespace-2626.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<!-- test inherit-namespaces="  0" (with whitespace) on xsl:copy -->
+
+
+<xsl:output method="xml" version="1.1" undeclare-prefixes="yes"/>
+
+<xsl:template match = "/">
+  <xsl:variable name="e" as="element()">
+    <n:a xmlns:n="http://n/" xmlns="http://d/"/>
+  </xsl:variable>
+  <xsl:for-each select="$e">
+    <xsl:copy inherit-namespaces="  0">
+      <xsl:call-template name="c"/>
+    </xsl:copy>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template name="c">
+  <n:b xmlns:n="http://n2/"/>
+  <c xmlns="http://n3/"/>  
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/type/namespace/namespace-2627.xsl	Tue Aug 12 10:05:04 2014 +0100
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<!-- test inherit-namespaces="FALSE" on xsl:copy (not allowed) -->
+
+
+<xsl:output method="xml" version="1.1" undeclare-prefixes="yes"/>
+
+<xsl:template match = "/">
+  <xsl:variable name="e" as="element()">
+    <n:a xmlns:n="http://n/" xmlns="http://d/"/>
+  </xsl:variable>
+  <xsl:for-each select="$e">
+    <xsl:copy inherit-namespaces="FALSE">
+      <xsl:call-template name="c"/>
+    </xsl:copy>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template name="c">
+  <n:b xmlns:n="http://n2/"/>
+  <c xmlns="http://n3/"/>  
+</xsl:template>
+
+</xsl:stylesheet>