Commit merge
authorMichael Kay <mike@saxonica.com>
Tue, 19 Aug 2014 14:34:23 +0100
changeset 621 20e04d759575
parent 620 f645b71b3736 (current diff)
parent 616 94e24004aed9 (diff)
child 623 f308fce13cab
child 625 7447836d3ca8
Commit merge
tests/decl/accumulator/_accumulator-test-set.xml
--- a/admin/catalog-schema.xsd	Tue Aug 19 14:31:52 2014 +0100
+++ b/admin/catalog-schema.xsd	Tue Aug 19 14:34:23 2014 +0100
@@ -1533,6 +1533,22 @@
             </xs:simpleContent>
         </xs:complexType>
     </xs:element>
+    
+    <xs:element name="assert-warning" substitutionGroup="abstractAssertion">
+        <xs:annotation>
+            <xs:documentation>
+                <div>
+                    <h3>assert-warning</h3>
+                    <p>
+                        Asserts the processor has output a warning. The content of the warning cannot be tested.
+                    </p>                    
+                </div> 
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+                <xs:sequence/>            
+        </xs:complexType>
+    </xs:element>
 
     <xs:element name="assert-serialization" substitutionGroup="abstractAssertion">
         <xs:annotation>
--- a/tests/attr/match/_match-test-set.xml	Tue Aug 19 14:31:52 2014 +0100
+++ b/tests/attr/match/_match-test-set.xml	Tue Aug 19 14:34:23 2014 +0100
@@ -4006,6 +4006,7 @@
       <description>Test xsl:mode typed="strict" with untyped nodes. Derived from match-140.</description>
       <keywords>xsl:import-schema Wildcard NCName child-axis typed-strict xsl:mode</keywords>
       <created by="Michael Kay" on="2014-04-30"/>
+      <modified by="Debbie Lockett" on="2014-08-13" change="Corrected error code"/>
       <environment ref="match3001"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -4016,7 +4017,7 @@
          <stylesheet file="match-219.xsl"/>
       </test>
       <result>
-         <error code="XTTE3110"/>
+         <error code="XTTE3100"/>
       </result>
    </test-case>
    
@@ -4097,9 +4098,10 @@
       </description>
       <keywords>xsl:import-schema typed-strict child-axis</keywords>
       <created by="Michael Kay" on="2014-05-01"/>
+      <modified by="Debbie Lockett" on="2014-08-13" change="Spec dependency corrected"/>
       <environment ref="match3002"/>
       <dependencies>
-         <spec value="XSLT20+"/>
+         <spec value="XSLT30+"/>
          <feature value="schema_aware"/>
       </dependencies>
       <test>
@@ -4134,9 +4136,10 @@
       </description>
       <keywords>xsl:import-schema xsl:mode typed-strict child-axis</keywords>
       <created by="Michael Kay" on="2014-05-01"/>
+      <modified by="Debbie Lockett" on="2014-08-13" change="Spec dependency corrected"/>
       <environment ref="match3002"/>
       <dependencies>
-         <spec value="XSLT20+"/>
+         <spec value="XSLT30+"/>
          <feature value="schema_aware"/>
       </dependencies>
       <test>
@@ -4146,4 +4149,89 @@
          <assert-xml><![CDATA[<out data=""><A1>http://www.example.com/ns/test</A1><B2>123-AB</B2><E7>5</E7></out>]]></assert-xml>
       </result>
    </test-case>   
+   
+   <test-case name="match-227">
+      <description>Test xsl:mode typed=" yes ".</description>
+      <keywords>xsl:import-schema SchemaElementTest child-axis typed-yes xsl:mode</keywords>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="match3002"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="schema_aware"/>
+      </dependencies>
+      <test>
+         <stylesheet file="match-227.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><A1>http://www.example.com/ns/test</A1><B2>123-AB</B2><E7>5</E7></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="match-228">
+      <description>Test xsl:mode typed="true".</description>
+      <keywords>xsl:import-schema SchemaElementTest child-axis typed-true xsl:mode</keywords>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="match3002"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="schema_aware"/>
+      </dependencies>
+      <test>
+         <stylesheet file="match-228.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><A1>http://www.example.com/ns/test</A1><B2>123-AB</B2><E7>5</E7></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="match-229">
+      <description>Test xsl:mode typed="1".</description>
+      <keywords>xsl:import-schema SchemaElementTest child-axis typed-1 xsl:mode</keywords>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="match3002"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="schema_aware"/>
+      </dependencies>
+      <test>
+         <stylesheet file="match-229.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><A1>http://www.example.com/ns/test</A1><B2>123-AB</B2><E7>5</E7></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="match-230">
+      <description>Test xsl:mode typed="unspecified".</description>
+      <keywords>xsl:import-schema SchemaElementTest child-axis typed-unspecified xsl:mode</keywords>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="match3002"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="schema_aware"/>
+      </dependencies>
+      <test>
+         <stylesheet file="match-230.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><A1>http://www.example.com/ns/test</A1><B2>123-AB</B2><E7>5</E7></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="match-231">
+      <description>Test xsl:mode with typed="no", fails because nodes are typed.</description>
+      <keywords>xsl:import-schema SchemaElementTest child-axis typed-no xsl:mode</keywords>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="match3002"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="schema_aware"/>
+      </dependencies>
+      <test>
+         <stylesheet file="match-231.xsl"/>
+      </test>
+      <result>
+         <error code="XTTE3110"/>
+      </result>
+   </test-case>
 </test-set>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/match/match-227.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xslt:transform xmlns:my="http://www.example.com/ns/match/var"
+                xmlns:pre="http://www.example.com/ns/match/var"
+                xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+                exclude-result-prefixes="my xs pre"
+                version="3.0">
+   <!-- Purpose: Test xsl:mode typed=" yes ". -->
+
+   <xslt:import-schema namespace="http://www.example.com/ns/match/var"
+                       schema-location="variousTypesSchemaMatch.xsd"/>
+   
+   <xslt:mode typed=" yes "/>
+
+   <xslt:template match="schema-element(my:userNode)">
+	  <out>
+         <xslt:apply-templates select="*"/>
+      </out>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(pre:simpleBuiltin)">
+	     <xslt:element name="A{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(my:simpleUserElem)">
+	     <xslt:element name="B{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(my:complexSimpleContentElem)">
+	     <xslt:element name="E{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="element(*)"/>
+
+</xslt:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/match/match-228.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xslt:transform xmlns:my="http://www.example.com/ns/match/var"
+                xmlns:pre="http://www.example.com/ns/match/var"
+                xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+                exclude-result-prefixes="my xs pre"
+                version="3.0">
+   <!-- Purpose: Test xsl:mode typed="true". -->
+
+   <xslt:import-schema namespace="http://www.example.com/ns/match/var"
+                       schema-location="variousTypesSchemaMatch.xsd"/>
+   
+   <xslt:mode typed="true"/>
+
+   <xslt:template match="schema-element(my:userNode)">
+	  <out>
+         <xslt:apply-templates select="*"/>
+      </out>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(pre:simpleBuiltin)">
+	     <xslt:element name="A{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(my:simpleUserElem)">
+	     <xslt:element name="B{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(my:complexSimpleContentElem)">
+	     <xslt:element name="E{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="element(*)"/>
+
+</xslt:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/match/match-229.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xslt:transform xmlns:my="http://www.example.com/ns/match/var"
+                xmlns:pre="http://www.example.com/ns/match/var"
+                xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+                exclude-result-prefixes="my xs pre"
+                version="3.0">
+   <!-- Purpose: Test xsl:mode typed="1". -->
+
+   <xslt:import-schema namespace="http://www.example.com/ns/match/var"
+                       schema-location="variousTypesSchemaMatch.xsd"/>
+   
+   <xslt:mode typed="1"/>
+
+   <xslt:template match="schema-element(my:userNode)">
+	  <out>
+         <xslt:apply-templates select="*"/>
+      </out>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(pre:simpleBuiltin)">
+	     <xslt:element name="A{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(my:simpleUserElem)">
+	     <xslt:element name="B{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(my:complexSimpleContentElem)">
+	     <xslt:element name="E{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="element(*)"/>
+
+</xslt:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/match/match-230.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xslt:transform xmlns:my="http://www.example.com/ns/match/var"
+                xmlns:pre="http://www.example.com/ns/match/var"
+                xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+                exclude-result-prefixes="my xs pre"
+                version="3.0">
+   <!-- Purpose: Test xsl:mode typed="unspecified". -->
+
+   <xslt:import-schema namespace="http://www.example.com/ns/match/var"
+                       schema-location="variousTypesSchemaMatch.xsd"/>
+   
+   <xslt:mode typed="unspecified"/>
+
+   <xslt:template match="schema-element(my:userNode)">
+	  <out>
+         <xslt:apply-templates select="*"/>
+      </out>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(pre:simpleBuiltin)">
+	     <xslt:element name="A{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(my:simpleUserElem)">
+	     <xslt:element name="B{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(my:complexSimpleContentElem)">
+	     <xslt:element name="E{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="element(*)"/>
+
+</xslt:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/match/match-231.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xslt:transform xmlns:my="http://www.example.com/ns/match/var"
+                xmlns:pre="http://www.example.com/ns/match/var"
+                xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+                exclude-result-prefixes="my xs pre"
+                version="3.0">
+   <!-- Purpose: Test xsl:mode with typed="no", fails because nodes are typed. -->
+
+   <xslt:import-schema namespace="http://www.example.com/ns/match/var"
+                       schema-location="variousTypesSchemaMatch.xsd"/>
+   
+   <xslt:mode typed="no"/>
+
+   <xslt:template match="schema-element(my:userNode)">
+	  <out>
+         <xslt:apply-templates select="*"/>
+      </out>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(pre:simpleBuiltin)">
+	     <xslt:element name="A{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(my:simpleUserElem)">
+	     <xslt:element name="B{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="child::schema-element(my:complexSimpleContentElem)">
+	     <xslt:element name="E{position()}">
+		       <xslt:value-of select="."/>
+	     </xslt:element>
+   </xslt:template>
+
+   <xslt:template match="element(*)"/>
+
+</xslt:transform>
--- a/tests/attr/mode/_mode-test-set.xml	Tue Aug 19 14:31:52 2014 +0100
+++ b/tests/attr/mode/_mode-test-set.xml	Tue Aug 19 14:34:23 2014 +0100
@@ -300,6 +300,56 @@
       </result>
    </test-case>
    
+   <test-case name="mode-0012">
+      <description>Test xsl:mode on-no-match with namespace nodes; streaming= " yes ", "true", and "1"</description>
+      <keywords>xsl:mode on-no-match-attribute shallow-skip shallow-copy text-only-copy variable-reference namespace-nodes parentless-nodes streamable</keywords>
+      <created by="Debbie Lockett" on="2014-08-12"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="streaming"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-0012.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><c xmlns:a="http://abracadabra.com/"/><d/><s/></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="mode-0013">
+      <description>Test xsl:mode on-no-match with namespace nodes; streaming= "no", "false" and "0"</description>
+      <keywords>xsl:mode on-no-match-attribute shallow-skip shallow-copy text-only-copy variable-reference namespace-nodes parentless-nodes non-streamable</keywords>
+      <created by="Debbie Lockett" on="2014-08-12"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-0013.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><c xmlns:a="http://abracadabra.com/"/><d/><s/></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="mode-0014">
+      <description>Test xsl:mode on-no-match with namespace nodes; streaming= "YES" (not allowed)</description>
+      <keywords>xsl:mode on-no-match-attribute shallow-skip shallow-copy text-only-copy variable-reference namespace-nodes parentless-nodes streamable</keywords>
+      <created by="Debbie Lockett" on="2014-08-12"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="streaming"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-0014.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
+   
    <test-case name="mode-0101">
       <description>Simple test of xsl:apply-templates with mode.</description>
       <keywords>matching-mode</keywords>
@@ -575,6 +625,92 @@
          <assert-xml file="mode-0801.out"/>
       </result>
    </test-case>
+   
+   <test-case name="mode-0802">
+      <description>Ambiguous match, use warning-on-multiple-match=" yes "</description>
+      <keywords>conflict-resolution matching-mode multiple-matching-templates</keywords>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="mode-08"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-0802.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <assert-xml file="mode-0801.out"/>
+            <assert-warning/>            
+         </all-of>     
+      </result>
+   </test-case>
+   
+   <test-case name="mode-0803">
+      <description>Ambiguous match, use warning-on-multiple-match="no"</description>
+      <keywords>conflict-resolution matching-mode multiple-matching-templates</keywords>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="mode-08"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-0803.xsl"/>
+      </test>
+      <result>
+            <assert-xml file="mode-0801.out"/>              
+      </result>
+   </test-case>
+   
+   <test-case name="mode-0804">
+      <description>Ambiguous match, use warning-on-multiple-match="true" and "1"</description>
+      <keywords>conflict-resolution matching-mode multiple-matching-templates</keywords>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="mode-08"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-0804.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <assert-xml file="mode-0801.out"/>
+            <assert-warning/>            
+         </all-of>     
+      </result>
+   </test-case>
+   
+   <test-case name="mode-0805">
+      <description>Ambiguous match, use warning-on-multiple-match="false" and "0"</description>
+      <keywords>conflict-resolution matching-mode multiple-matching-templates</keywords>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="mode-08"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-0805.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="mode-0801.out"/>              
+      </result>
+   </test-case>
+   
+   <test-case name="mode-0806">
+      <description>Ambiguous match, use warning-on-multiple-match="Yes" (not allowed)</description>
+      <keywords>conflict-resolution matching-mode multiple-matching-templates</keywords>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="mode-08"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-0806.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>              
+      </result>
+   </test-case>
 
    <test-case name="mode-0901">
       <description>FileName: MODES16 Document: http://www.w3.org/TR/xslt DocVersion: 19991116 Section: 5.7 Modes</description>
@@ -859,6 +995,7 @@
       <description>Test xsl:mode on-no-match="text-only-copy"</description>
       <keywords>xsl:mode on-no-match-attribute text-only-copy matching-mode</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-12" change="use normalize-space in assert"/>
       <environment ref="mode-14"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -868,8 +1005,7 @@
          <initial-mode name="s"/>
       </test>
       <result>
-         <assert>starts-with(., "
- The First Book of Moses, Called GENESIS.")</assert>
+         <assert>starts-with(normalize-space(.), "The First Book of Moses, Called GENESIS.")</assert>
       </result>
    </test-case>
 
@@ -877,6 +1013,7 @@
       <description>Test xsl:mode on-no-match="text-only-copy", streaming</description>
       <keywords>xsl:mode on-no-match-attribute text-only-copy streamable buildin-template-rules</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-12" change="use normalize-space in assert"/>
       <environment ref="mode-14s"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -887,8 +1024,7 @@
          <initial-mode name="s"/>
       </test>
       <result>
-         <assert>starts-with(., "
- The First Book of Moses, Called GENESIS.")</assert>
+         <assert>starts-with(normalize-space(.), "The First Book of Moses, Called GENESIS.")</assert>         
       </result>
    </test-case>
 
@@ -896,6 +1032,7 @@
       <description>Test xsl:mode on-no-match="text-only-copy"</description>
       <keywords>xsl:mode on-no-match-attribute text-only-copy matching-mode</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-12" change="use normalize-space in assert"/>
       <environment ref="mode-14"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -905,8 +1042,7 @@
          <initial-mode name="s"/>
       </test>
       <result>
-         <assert>starts-with(., "
- The First Book of Moses, Called GENESIS.")</assert>
+         <assert>starts-with(normalize-space(.), "The First Book of Moses, Called GENESIS.")</assert>
       </result>
    </test-case>
 
@@ -914,6 +1050,7 @@
       <description>Test xsl:mode on-no-match="text-only-copy"; streaming</description>
       <keywords>xsl:mode on-no-match-attribute text-only-copy streamable initial-mode</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-12" change="use normalize-space in assert"/>
       <environment ref="mode-14s"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -924,8 +1061,7 @@
          <initial-mode name="s"/>
       </test>
       <result>
-         <assert>starts-with(., "
- The First Book of Moses, Called GENESIS.")</assert>
+         <assert>starts-with(normalize-space(.), "The First Book of Moses, Called GENESIS.")</assert>
       </result>
    </test-case>
 
@@ -933,6 +1069,7 @@
       <description>Test xsl:mode on-no-match="text-only-copy"</description>
       <keywords>xsl:mode on-no-match-attribute text-only-copy TextTest</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-12" change="use normalize-space in assert"/>
       <environment ref="mode-14"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -941,8 +1078,7 @@
          <stylesheet file="mode-1409.xsl"/>
       </test>
       <result>
-         <assert>starts-with(., "
- THE FIRST BOOK OF MOSES, CALLED GENESIS.")</assert>
+         <assert>starts-with(normalize-space(.), "THE FIRST BOOK OF MOSES, CALLED GENESIS.")</assert>
       </result>
    </test-case>
 
@@ -950,6 +1086,7 @@
       <description>Test xsl:mode on-no-match="text-only-copy"; streaming</description>
       <keywords>xsl:mode on-no-match-attribute text-only-copy TextTest streamable</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-12" change="use normalize-space in assert"/>
       <environment ref="mode-14s"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -959,8 +1096,7 @@
          <stylesheet file="mode-1410.xsl"/>
       </test>
       <result>
-         <assert>starts-with(., "
- THE FIRST BOOK OF MOSES, CALLED GENESIS.")</assert>
+         <assert>starts-with(normalize-space(.), "THE FIRST BOOK OF MOSES, CALLED GENESIS.")</assert>
       </result>
    </test-case>
 
@@ -1242,6 +1378,7 @@
       <description>Test xsl:mode warning-on-no-match=yes</description>
       <keywords>xsl:mode on-no-match-attribute text-only-copy matching-mode xsl:apply-imports</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-12" change="assert-warning added, use normalize-space in assert"/>
       <environment ref="mode-14"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -1252,11 +1389,11 @@
       </test>
       <result>
          <all-of>
-            <assert>starts-with(., "
- The First Book of Moses, Called GENESIS.")</assert>
+            <assert>starts-with(normalize-space(.), "The First Book of Moses, Called GENESIS.")</assert>
             <assert-message>
                <assert-xml><![CDATA[** Expect no-matching-template warnings **]]></assert-xml>
             </assert-message>
+            <assert-warning/>
          </all-of>
       </result>
    </test-case>
@@ -1265,6 +1402,7 @@
       <description>Test xsl:mode warning-on-no-match=yes; streaming</description>
       <keywords>xsl:mode on-no-match-attribute streamable text-only-copy matching-mode warning-on-no-match</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-12" change="assert-warning added, use normalize-space in assert"/>
       <environment ref="mode-14s"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -1276,11 +1414,11 @@
       </test>
       <result>
          <all-of>
-            <assert>starts-with(., "
- The First Book of Moses, Called GENESIS.")</assert>
+            <assert>starts-with(normalize-space(.), "The First Book of Moses, Called GENESIS.")</assert>
             <assert-message>
                <assert-xml><![CDATA[** Expect no-matching-template warnings **]]></assert-xml>
             </assert-message>
+            <assert-warning/>
          </all-of>
       </result>
    </test-case>
@@ -1289,6 +1427,7 @@
       <description>Test xsl:mode warning-on-no-match=no</description>
       <keywords>xsl:mode on-no-match-attribute text-only-copy EQName warning-on-no-match</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-12" change="use normalize-space in assert"/>
       <environment ref="mode-14"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -1299,8 +1438,7 @@
       </test>
       <result>
          <all-of>
-            <assert>starts-with(., "
- The First Book of Moses, Called GENESIS.")</assert>
+            <assert>starts-with(normalize-space(.), "The First Book of Moses, Called GENESIS.")</assert>
             <assert-message>
                <assert-xml><![CDATA[** Expect NO no-matching-template warnings **]]></assert-xml>
             </assert-message>
@@ -1312,6 +1450,7 @@
       <description>Test xsl:mode warning-on-no-match=no; streaming</description>
       <keywords>xsl:mode on-no-match-attribute text-only-copy matching-mode warning-on-no-match xsl:apply-imports</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-12" change="use normalize-space in assert"/>
       <environment ref="mode-14s"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -1323,8 +1462,7 @@
       </test>
       <result>
          <all-of>
-            <assert>starts-with(., "
- The First Book of Moses, Called GENESIS.")</assert>
+            <assert>starts-with(normalize-space(.), "The First Book of Moses, Called GENESIS.")</assert>
             <assert-message>
                <assert-xml><![CDATA[** Expect NO no-matching-template warnings **]]></assert-xml>
             </assert-message>
@@ -1468,6 +1606,7 @@
       <description>Test xsl:mode with typed="yes", fails because nodes are untyped</description>
       <keywords>xsl:mode on-no-match-attribute shallow-copy typed-yes XTTE3100</keywords>
       <created by="Michael Kay" on="2013-06-15"/>
+      <modified by="Debbie Lockett" on="2014-08-13" change="Fixed mode name"/>
       <environment ref="mode-14s"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -1498,7 +1637,165 @@
          <error code="XTTE3100"/>
       </result>
    </test-case>
-
+   
+   <test-case name="mode-1440">
+      <description>Test xsl:mode warning-on-no-match="true"</description>
+      <keywords>xsl:mode on-no-match-attribute text-only-copy matching-mode xsl:apply-imports</keywords>
+      <created by="Debbie Lockett" on="2014-08-12"/>
+      <environment ref="mode-14"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-1440.xsl"/>
+         <initial-mode name="s"/>
+      </test>
+      <result>
+         <all-of>
+            <assert>starts-with(normalize-space(.), "The First Book of Moses, Called GENESIS.")</assert>
+            <assert-message>
+               <assert-xml><![CDATA[** Expect no-matching-template warnings **]]></assert-xml>
+            </assert-message>
+            <assert-warning/>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="mode-1441">
+      <description>Test xsl:mode warning-on-no-match="false"</description>
+      <keywords>xsl:mode on-no-match-attribute text-only-copy warning-on-no-match</keywords>
+      <created by="Debbie Lockett" on="2014-08-12"/>
+      <environment ref="mode-14"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-1441.xsl"/>
+         <initial-mode name="s"/>
+      </test>
+      <result>
+         <all-of>
+            <assert>starts-with(normalize-space(.), "The First Book of Moses, Called GENESIS.")</assert>
+            <assert-message>
+               <assert-xml><![CDATA[** Expect NO no-matching-template warnings **]]></assert-xml>
+            </assert-message>
+         </all-of>
+      </result>
+   </test-case>
+         
+   <test-case name="mode-1442">
+      <description>Test xsl:mode warning-on-no-match="1"</description>
+      <keywords>xsl:mode on-no-match-attribute text-only-copy matching-mode xsl:apply-imports</keywords>
+      <created by="Debbie Lockett" on="2014-08-12"/>
+      <environment ref="mode-14"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-1442.xsl"/>
+         <initial-mode name="s"/>
+      </test>
+      <result>
+         <all-of>
+            <assert>starts-with(normalize-space(.), "The First Book of Moses, Called GENESIS.")</assert>
+            <assert-message>
+               <assert-xml><![CDATA[** Expect no-matching-template warnings **]]></assert-xml>
+            </assert-message>
+            <assert-warning/>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="mode-1443">
+      <description>Test xsl:mode warning-on-no-match="0"</description>
+      <keywords>xsl:mode on-no-match-attribute text-only-copy warning-on-no-match</keywords>
+      <created by="Debbie Lockett" on="2014-08-12"/>
+      <environment ref="mode-14"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-1443.xsl"/>
+         <initial-mode name="s"/>
+      </test>
+      <result>
+         <all-of>
+            <assert>starts-with(normalize-space(.), "The First Book of Moses, Called GENESIS.")</assert>
+            <assert-message>
+               <assert-xml><![CDATA[** Expect NO no-matching-template warnings **]]></assert-xml>
+            </assert-message>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="mode-1444">
+      <description>Test xsl:mode warning-on-no-match="Yes" (not allowed) </description>
+      <keywords>xsl:mode on-no-match-attribute text-only-copy matching-mode xsl:apply-imports</keywords>
+      <created by="Debbie Lockett" on="2014-08-12"/>
+      <environment ref="mode-14"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-1444.xsl"/>
+         <initial-mode name="s"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
+   
+   <test-case name="mode-1445">
+      <description>Test xsl:mode typed=" false "</description>
+      <keywords>xsl:mode on-no-match-attribute shallow-copy typed-false buildin-template-rules</keywords>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="mode-14"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-1445.xsl"/>
+         <initial-mode name="s"/>
+      </test>
+      <result>
+         <assert-xml file="mode-1411.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="mode-1446">
+      <description>Test xsl:mode typed="0"</description>
+      <keywords>xsl:mode on-no-match-attribute shallow-copy typed-0 buildin-template-rules</keywords>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="mode-14"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-1446.xsl"/>
+         <initial-mode name="s"/>
+      </test>
+      <result>
+         <assert-xml file="mode-1411.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="mode-1447">
+      <description>Test xsl:mode typed="No" (not allowed)</description>
+      <keywords>xsl:mode on-no-match-attribute shallow-copy typed buildin-template-rules</keywords>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="mode-14"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="mode-1447.xsl"/>
+         <initial-mode name="s"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
+      
    <test-case name="mode-1501">
       <description>Test for mode="#all" with match="node()"</description>
       <keywords>mode-#all mode-#current</keywords>
@@ -1601,7 +1898,6 @@
       <result>
          <error code="XTSE0545"/>
       </result>
-   </test-case>
-   
+   </test-case>   
    
 </test-set>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-0012.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,27 @@
+<?xml version="1.0"?> 
+
+<!-- Test xsl:mode on-no-match with namespace nodes; streaming= " yes ", "true", and "1" -->
+<!-- on-no-match=various, namespace nodes, with streaming --> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+
+  <xsl:mode name="c" on-no-match="shallow-copy" streamable="true"/> 
+  <xsl:mode name="d" on-no-match="shallow-skip" streamable="1"/>
+  <xsl:mode name="s" on-no-match="text-only-copy" streamable=" yes "/>
+  
+  <xsl:variable name="temp" as="namespace-node()">
+    <xsl:namespace name="a">http://abracadabra.com/</xsl:namespace>
+  </xsl:variable>
+  
+  <xsl:template name="main">
+    <out>
+      <c><xsl:apply-templates select="$temp" mode="c"/></c>
+      <d><xsl:apply-templates select="$temp" mode="d"/></d>
+      <s><xsl:apply-templates select="$temp" mode="s"/></s>
+    </out>
+  </xsl:template>
+  
+    
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-0013.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,27 @@
+<?xml version="1.0"?> 
+
+<!-- Test xsl:mode on-no-match with namespace nodes; streaming= "no", "false" and "0" -->
+<!-- on-no-match=various, namespace nodes, with streaming --> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+
+  <xsl:mode name="c" on-no-match="shallow-copy" streamable="no"/> 
+  <xsl:mode name="d" on-no-match="shallow-skip" streamable="false"/>
+  <xsl:mode name="s" on-no-match="text-only-copy" streamable="0"/>
+  
+  <xsl:variable name="temp" as="namespace-node()">
+    <xsl:namespace name="a">http://abracadabra.com/</xsl:namespace>
+  </xsl:variable>
+  
+  <xsl:template name="main">
+    <out>
+      <c><xsl:apply-templates select="$temp" mode="c"/></c>
+      <d><xsl:apply-templates select="$temp" mode="d"/></d>
+      <s><xsl:apply-templates select="$temp" mode="s"/></s>
+    </out>
+  </xsl:template>
+  
+    
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-0014.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,27 @@
+<?xml version="1.0"?> 
+
+<!-- Test xsl:mode on-no-match with namespace nodes; streaming= "YES" (not allowed) -->
+<!-- on-no-match=various, namespace nodes, with streaming --> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+
+  <xsl:mode name="c" on-no-match="shallow-copy" streamable="yes"/> 
+  <xsl:mode name="d" on-no-match="shallow-skip" streamable="YES"/>
+  <xsl:mode name="s" on-no-match="text-only-copy" streamable=" yes "/>
+  
+  <xsl:variable name="temp" as="namespace-node()">
+    <xsl:namespace name="a">http://abracadabra.com/</xsl:namespace>
+  </xsl:variable>
+  
+  <xsl:template name="main">
+    <out>
+      <c><xsl:apply-templates select="$temp" mode="c"/></c>
+      <d><xsl:apply-templates select="$temp" mode="d"/></d>
+      <s><xsl:apply-templates select="$temp" mode="s"/></s>
+    </out>
+  </xsl:template>
+  
+    
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-0802.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<?spec xslt#modes?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- Within a given mode, there are situations when more than one template
+    will match. Normal conflict-resolution rules should apply. -->
+  
+  <xsl:mode name="c" warning-on-multiple-match=" yes "/>
+  <xsl:mode name="d" warning-on-multiple-match="yes"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="sss/sss" mode="c"/>
+    <xsl:apply-templates select="sss/sss" mode="d"/>
+    <xsl:apply-templates select="sss//i" mode="c"/>
+    <xsl:apply-templates select="sss//i" mode="d"/>
+    <xsl:apply-templates select="/sss/sss/i" mode="c"/>
+    <xsl:apply-templates select="/sss/sss/i" mode="d"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="sss//*" mode="d">
+ !Any descendant of any sss!
+</xsl:template>
+
+<xsl:template match="/sss//*" mode="d">
+ +Any descendant of root sss+
+</xsl:template>
+
+<xsl:template match="sss/*" mode="c">
+ -Any child of any sss-
+</xsl:template>
+
+<xsl:template match="/sss/*" mode="c">
+ -Any child of root sss-
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-0803.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<?spec xslt#modes?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- Within a given mode, there are situations when more than one template
+    will match. Normal conflict-resolution rules should apply. -->
+  
+  <xsl:mode name="c" warning-on-multiple-match="no"/>
+  <xsl:mode name="d" warning-on-multiple-match="no"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="sss/sss" mode="c"/>
+    <xsl:apply-templates select="sss/sss" mode="d"/>
+    <xsl:apply-templates select="sss//i" mode="c"/>
+    <xsl:apply-templates select="sss//i" mode="d"/>
+    <xsl:apply-templates select="/sss/sss/i" mode="c"/>
+    <xsl:apply-templates select="/sss/sss/i" mode="d"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="sss//*" mode="d">
+ !Any descendant of any sss!
+</xsl:template>
+
+<xsl:template match="/sss//*" mode="d">
+ +Any descendant of root sss+
+</xsl:template>
+
+<xsl:template match="sss/*" mode="c">
+ -Any child of any sss-
+</xsl:template>
+
+<xsl:template match="/sss/*" mode="c">
+ -Any child of root sss-
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-0804.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<?spec xslt#modes?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- Within a given mode, there are situations when more than one template
+    will match. Normal conflict-resolution rules should apply. -->
+  
+  <xsl:mode name="c" warning-on-multiple-match="true"/>
+  <xsl:mode name="d" warning-on-multiple-match="1"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="sss/sss" mode="c"/>
+    <xsl:apply-templates select="sss/sss" mode="d"/>
+    <xsl:apply-templates select="sss//i" mode="c"/>
+    <xsl:apply-templates select="sss//i" mode="d"/>
+    <xsl:apply-templates select="/sss/sss/i" mode="c"/>
+    <xsl:apply-templates select="/sss/sss/i" mode="d"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="sss//*" mode="d">
+ !Any descendant of any sss!
+</xsl:template>
+
+<xsl:template match="/sss//*" mode="d">
+ +Any descendant of root sss+
+</xsl:template>
+
+<xsl:template match="sss/*" mode="c">
+ -Any child of any sss-
+</xsl:template>
+
+<xsl:template match="/sss/*" mode="c">
+ -Any child of root sss-
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-0805.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<?spec xslt#modes?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- Within a given mode, there are situations when more than one template
+    will match. Normal conflict-resolution rules should apply. -->
+  
+  <xsl:mode name="c" warning-on-multiple-match="false"/>
+  <xsl:mode name="d" warning-on-multiple-match="0"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="sss/sss" mode="c"/>
+    <xsl:apply-templates select="sss/sss" mode="d"/>
+    <xsl:apply-templates select="sss//i" mode="c"/>
+    <xsl:apply-templates select="sss//i" mode="d"/>
+    <xsl:apply-templates select="/sss/sss/i" mode="c"/>
+    <xsl:apply-templates select="/sss/sss/i" mode="d"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="sss//*" mode="d">
+ !Any descendant of any sss!
+</xsl:template>
+
+<xsl:template match="/sss//*" mode="d">
+ +Any descendant of root sss+
+</xsl:template>
+
+<xsl:template match="sss/*" mode="c">
+ -Any child of any sss-
+</xsl:template>
+
+<xsl:template match="/sss/*" mode="c">
+ -Any child of root sss-
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-0806.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<?spec xslt#modes?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- Within a given mode, there are situations when more than one template
+    will match. Normal conflict-resolution rules should apply. -->
+  
+  <xsl:mode name="c" warning-on-multiple-match="Yes"/>
+  <xsl:mode name="d" warning-on-multiple-match="yes"/>
+
+<xsl:template match="/">
+  <out>
+    <xsl:apply-templates select="sss/sss" mode="c"/>
+    <xsl:apply-templates select="sss/sss" mode="d"/>
+    <xsl:apply-templates select="sss//i" mode="c"/>
+    <xsl:apply-templates select="sss//i" mode="d"/>
+    <xsl:apply-templates select="/sss/sss/i" mode="c"/>
+    <xsl:apply-templates select="/sss/sss/i" mode="d"/>
+  </out>
+</xsl:template>
+
+<xsl:template match="sss//*" mode="d">
+ !Any descendant of any sss!
+</xsl:template>
+
+<xsl:template match="/sss//*" mode="d">
+ +Any descendant of root sss+
+</xsl:template>
+
+<xsl:template match="sss/*" mode="c">
+ -Any child of any sss-
+</xsl:template>
+
+<xsl:template match="/sss/*" mode="c">
+ -Any child of root sss-
+</xsl:template>
+
+</xsl:stylesheet>
--- a/tests/attr/mode/mode-1438.xsl	Tue Aug 19 14:31:52 2014 +0100
+++ b/tests/attr/mode/mode-1438.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -7,6 +7,6 @@
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
   exclude-result-prefixes="xs">
  
-  <xsl:mode on-no-match="shallow-copy" typed="yes"/>
+  <xsl:mode name="s" on-no-match="shallow-copy" typed="yes"/>
     
 </xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-1440.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<!-- on-no-match="text-only-copy", with warning-on-no-match="true" --> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+ 
+  <xsl:mode name="s" on-no-match="text-only-copy" warning-on-no-match="true"/>
+  
+  <xsl:template match="/" mode="s">
+    <xsl:message>** Expect no-matching-template warnings **</xsl:message>
+    <xsl:apply-imports/>
+  </xsl:template>
+  
+  <xsl:template match="*" mode="s">
+    <xsl:apply-templates mode="#current"/>
+  </xsl:template>
+   
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-1441.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<!-- on-no-match="text-only-copy", with warning-on-no-match=" false " --> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version=" 3.0 "
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes=" xs ">
+ 
+  <xsl:mode name=" s " on-no-match=" text-only-copy " warning-on-no-match=" no "/>
+  
+  <xsl:template match=" / " mode=" s ">
+    <xsl:message>** Expect NO no-matching-template warnings **</xsl:message>
+    <xsl:apply-imports/>
+  </xsl:template>
+  
+  <xsl:template match=" * " mode= "s ">
+    <xsl:apply-templates mode=" #current "/>
+  </xsl:template>
+   
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-1442.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<!-- on-no-match="text-only-copy", with warning-on-no-match="1" --> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+ 
+  <xsl:mode name="s" on-no-match="text-only-copy" warning-on-no-match="1"/>
+  
+  <xsl:template match="/" mode="s">
+    <xsl:message>** Expect no-matching-template warnings **</xsl:message>
+    <xsl:apply-imports/>
+  </xsl:template>
+  
+  <xsl:template match="*" mode="s">
+    <xsl:apply-templates mode="#current"/>
+  </xsl:template>
+   
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-1443.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<!-- on-no-match="text-only-copy", with warning-on-no-match="0" --> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version=" 3.0 "
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes=" xs ">
+ 
+  <xsl:mode name=" s " on-no-match=" text-only-copy " warning-on-no-match="0"/>
+  
+  <xsl:template match=" / " mode=" s ">
+    <xsl:message>** Expect NO no-matching-template warnings **</xsl:message>
+    <xsl:apply-imports/>
+  </xsl:template>
+  
+  <xsl:template match=" * " mode= "s ">
+    <xsl:apply-templates mode=" #current "/>
+  </xsl:template>
+   
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-1444.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<!-- on-no-match="text-only-copy", with warning-on-no-match="Yes" (not allowed) --> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+ 
+  <xsl:mode name="s" on-no-match="text-only-copy" warning-on-no-match="Yes"/>
+  
+  <xsl:template match="/" mode="s">
+    <xsl:message>** Expect no-matching-template warnings **</xsl:message>
+    <xsl:apply-imports/>
+  </xsl:template>
+  
+  <xsl:template match="*" mode="s">
+    <xsl:apply-templates mode="#current"/>
+  </xsl:template>
+   
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-1445.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+
+<!-- Test xsl:mode typed=" false " --> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+ 
+  <xsl:mode name="s" on-no-match="shallow-copy" typed=" false "/>
+    
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-1446.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+
+<!-- Test xsl:mode typed="0" --> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+ 
+  <xsl:mode name="s" on-no-match="shallow-copy" typed="0"/>
+    
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/mode/mode-1447.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+
+<!-- Test xsl:mode typed="No" (not allowed) --> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+ 
+  <xsl:mode name="s" on-no-match="shallow-copy" typed="No"/>
+    
+</xsl:stylesheet>
\ No newline at end of file
--- a/tests/decl/accumulator/_accumulator-test-set.xml	Tue Aug 19 14:31:52 2014 +0100
+++ b/tests/decl/accumulator/_accumulator-test-set.xml	Tue Aug 19 14:34:23 2014 +0100
@@ -67,10 +67,11 @@
       <description>Pre-descent accumulator functions called before and after</description>
       <keywords>xsl:mode on-no-match-attribute shallow-skip fn:accumulator-before</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-14" change="use streamable='false'"/>
       <environment ref="accumulator-002"/>
       <test>
          <stylesheet file="accumulator-003.xsl"/>
-         <param name="streamable" static="yes" select="'no'"/>
+         <param name="streamable" static="yes" select="'false'"/>
       </test>
       <result>
          <assert-xml><![CDATA[<figures><pix><p>Figure 1 start</p><p>Figure 1 end</p></pix
@@ -84,13 +85,14 @@
       <description>Pre-descent accumulator functions called before and after - streaming</description>
       <keywords>xsl:mode on-no-match-attribute shallow-skip fn:accumulator-before streamable</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-14" change="use streamable=' true '"/>
       <environment ref="accumulator-002s"/>
       <dependencies>
          <feature value="streaming"/>
       </dependencies>
       <test>
          <stylesheet file="accumulator-003.xsl"/>
-         <param name="streamable" static="yes" select="'yes'"/>
+         <param name="streamable" static="yes" select="' true '"/>
       </test>
       <result>
          <assert-xml><![CDATA[<figures><pix><p>Figure 1 start</p><p>Figure 1 end</p></pix
@@ -104,10 +106,11 @@
       <description>Pre-descent and post-descent accumulator functions</description>
       <keywords>xsl:mode on-no-match-attribute shallow-skip fn:accumulator-before fn:accumulator-after</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-14" change="use streamable='0'"/>
       <environment ref="accumulator-002"/>
       <test>
          <stylesheet file="accumulator-005.xsl"/>
-         <param name="streamable" static="yes" select="'no'"/>
+         <param name="streamable" static="yes" select="'0'"/>
       </test>
       <result>
          <assert-xml><![CDATA[<figures><pix><p>Figure 1 start</p><p>Figure 1.5 end</p></pix
@@ -121,13 +124,14 @@
       <description>Pre-descent and post-descent accumulator functions - streaming</description>
       <keywords>xsl:mode on-no-match-attribute shallow-skip fn:accumulator-before fn:accumulator-after streamable</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-14" change="use streamable='1'"/>
       <environment ref="accumulator-002s"/>
       <dependencies>
          <feature value="streaming"/>
       </dependencies>
       <test>
          <stylesheet file="accumulator-005.xsl"/>
-         <param name="streamable" static="yes" select="'yes'"/>
+         <param name="streamable" static="yes" select="'1'"/>
       </test>
       <result>
          <assert-xml><![CDATA[<figures><pix><p>Figure 1 start</p><p>Figure 1.5 end</p></pix
@@ -678,8 +682,20 @@
          </all-of>   
       </result>
    </test-case>
-
-
+   
+   <test-case name="accumulator-037">
+      <description>Basic test of accumulator functions with streamable="No" (not allowed)</description>
+      <keywords>xsl:mode on-no-match-attribute shallow-skip fn:accumulator-before ElementTest</keywords>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="accumulator-001"/>
+      <test>
+         <stylesheet file="accumulator-037.xsl"/>
+         <param name="streamable" static="yes" select="'No'"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
 
 
 </test-set>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/accumulator/accumulator-037.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:f="http://accum001/"
+  exclude-result-prefixes="xs f" version="3.0">
+
+  <!-- Simple test of an accumulator function with streamable="No" (not allowed) -->
+  
+  <xsl:param name="streamable" static="yes" select="'No'"/>
+
+  <xsl:accumulator name="figNr" as="xs:integer" initial-value="0" _streamable="{$streamable}">
+    <xsl:accumulator-rule match="chap" select="0"/>
+    <xsl:accumulator-rule match="fig" select="$value + 1"/>
+  </xsl:accumulator>
+
+  <xsl:mode _streamable="{$streamable}" on-no-match="shallow-skip"/>
+  
+  <xsl:template match="fig">
+    <xsl:apply-templates/>
+    <p>Figure <xsl:value-of select="accumulator-before('figNr')"/>: <xsl:value-of select="@alt"/></p>
+  </xsl:template>
+
+  <xsl:template match="/">
+    <figures>
+      <xsl:apply-templates/>
+    </figures>
+  </xsl:template>
+</xsl:stylesheet>
--- a/tests/decl/attribute-set/_attribute-set-test-set.xml	Tue Aug 19 14:31:52 2014 +0100
+++ b/tests/decl/attribute-set/_attribute-set-test-set.xml	Tue Aug 19 14:34:23 2014 +0100
@@ -77,6 +77,38 @@
          <assert-xml><![CDATA[<out><test67/></out>]]></assert-xml>
       </result>
    </test-case>
+   
+   <test-case name="attribute-set-0104">
+      <description>Use streamable=" no " on xsl:attribute-set (XSLT 3.0)</description>
+      <keywords>xsl:use-attribute-sets multiple-attribute-sets lre streamable</keywords>
+      <created by="Debbie Lockett" on="2014-08-014"/>
+      <environment ref="attribute-set-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="attribute-set-0104.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><test4 color="black" texture="matt"/></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="attribute-set-0105">
+      <description>Use streamable="false" and "0" on xsl:attribute-set (XSLT 3.0)</description>
+      <keywords>xsl:use-attribute-sets multiple-attribute-sets lre streamable</keywords>
+      <created by="Debbie Lockett" on="2014-08-014"/>
+      <environment ref="attribute-set-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="attribute-set-0105.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><test4 color="black" texture="matt"/></out>]]></assert-xml>
+      </result>
+   </test-case>
 
    <test-case name="attribute-set-0201">
       <description>Set attributes of a LRE from multiple attribute sets.</description>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/attribute-set/attribute-set-0104.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,25 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- PURPOSE: Test streamable="no" attribute -->
+  <?spec xslt#attribute-sets?>
+  
+  <xsl:param name="color" select="'black'"/>
+  <xsl:param name="texture" select="'matt'"/>
+
+  <xsl:attribute-set name="set1" streamable=" no ">
+    <xsl:attribute name="color" select="$color"/>
+  </xsl:attribute-set>
+  
+  <xsl:attribute-set name="set2" streamable="no">
+    <xsl:attribute name="texture" select="$texture"/>
+  </xsl:attribute-set>
+
+  <xsl:template match="/">
+    <out>
+      <test4 xsl:use-attribute-sets="set1 set2"></test4>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/attribute-set/attribute-set-0105.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,25 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- PURPOSE: Test streamable="false" and "0" attribute -->
+  <?spec xslt#attribute-sets?>
+  
+  <xsl:param name="color" select="'black'"/>
+  <xsl:param name="texture" select="'matt'"/>
+
+  <xsl:attribute-set name="set1" streamable="false">
+    <xsl:attribute name="color" select="$color"/>
+  </xsl:attribute-set>
+  
+  <xsl:attribute-set name="set2" streamable="0">
+    <xsl:attribute name="texture" select="$texture"/>
+  </xsl:attribute-set>
+
+  <xsl:template match="/">
+    <out>
+      <test4 xsl:use-attribute-sets="set1 set2"></test4>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- a/tests/decl/function/_function-test-set.xml	Tue Aug 19 14:31:52 2014 +0100
+++ b/tests/decl/function/_function-test-set.xml	Tue Aug 19 14:34:23 2014 +0100
@@ -213,6 +213,246 @@
     <union>24</union></out>]]></assert-xml>
       </result>
    </test-case>
+   
+   <test-case name="function-0103">
+      <description>simple xsl:function, test override=" yes " accepted</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0103.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>17</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0104">
+      <description>simple xsl:function, test override="no" accepted</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0104.xsl"/>
+      </test>
+      <result>
+         <assert>out</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0105">
+      <description>simple xsl:function, test override="true" accepted</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0105.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>17</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0106">
+      <description>simple xsl:function, test override="false" accepted</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0106.xsl"/>
+      </test>
+      <result>
+         <assert>out</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0107">
+      <description>simple xsl:function, test override="1" accepted</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0107.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>17</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0108">
+      <description>simple xsl:function, test override="0" accepted</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0108.xsl"/>
+      </test>
+      <result>
+         <assert>out</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0109">
+      <description>simple xsl:function, test override-extension-function="yes" and identity-sensitive="yes" accepted</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0109.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>17</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0110">
+      <description>simple xsl:function, test override-extension-function=" no " accepted</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0110.xsl"/>
+      </test>
+      <result>
+         <assert>out</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0111">
+      <description>simple xsl:function, test override-extension-function="true" and identity-sensitive="true" accepted</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0111.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>17</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0112">
+      <description>simple xsl:function, test override-extension-function="false" accepted</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0112.xsl"/>
+      </test>
+      <result>
+         <assert>out</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0113">
+      <description>simple xsl:function, test override-extension-function="1" and identity-sensitive="1" accepted</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0113.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>17</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0114">
+      <description>simple xsl:function, test override-extension-function="0" accepted</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0114.xsl"/>
+      </test>
+      <result>
+         <assert>out</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0115">
+      <description>simple xsl:function, test override-extension-function=" " (not allowed)</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0115.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0116">
+      <description>simple xsl:function, test @override-extension-function="yes" and @override="true" accepted</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0116.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>17</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0117">
+      <description>simple xsl:function, test @override-extension-function="1" and @override="no" rejected</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0117.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
+   
+   <test-case name="function-0118">
+      <description>simple xsl:function, test @identity-sensitive="Yes" (not allowed)</description>
+      <created by="Debbie Lockett" on="2014-08-15"/>
+      <environment ref="function-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="function-0118.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
 
    <test-case name="function-0201">
       <description>simple function, 2 args, one atomized</description>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0103.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test override=" yes " accepted -->
+
+  <xsl:function name="app:count-elements" override=" yes ">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0104.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test override="no" accepted -->
+
+  <xsl:function name="app:count-elements" override="no">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0105.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test override="true" accepted -->
+
+  <xsl:function name="app:count-elements" override="true">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0106.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test override="false" accepted -->
+
+  <xsl:function name="app:count-elements" override="false">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0107.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test override="1" accepted -->
+
+  <xsl:function name="app:count-elements" override="1">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0108.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test override="0" accepted -->
+
+  <xsl:function name="app:count-elements" override="0">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0109.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test override-extension-function="yes" and identity-sensitive="yes" accepted -->
+
+  <xsl:function name="app:count-elements" override-extension-function="yes" identity-sensitive="yes">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0110.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test override-extension-function=" no " accepted -->
+
+  <xsl:function name="app:count-elements" override-extension-function=" no ">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0111.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test override-extension-function="true" and identity-sensitive="true" accepted -->
+
+  <xsl:function name="app:count-elements" override-extension-function="true" identity-sensitive="true">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0112.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test override-extension-function="false" accepted -->
+
+  <xsl:function name="app:count-elements" override-extension-function="false">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0113.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test override-extension-function="1" and identity-sensitive="1" accepted -->
+
+  <xsl:function name="app:count-elements" override-extension-function="1" identity-sensitive="1">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0114.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test override-extension-function="0" accepted -->
+
+  <xsl:function name="app:count-elements" override-extension-function="0">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0115.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test override-extension-function=" " (not allowed) -->
+
+  <xsl:function name="app:count-elements" override-extension-function=" ">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0116.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test @override-extension-function="yes" and @override="true" accepted -->
+
+  <xsl:function name="app:count-elements" override-extension-function="yes" override="true">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0117.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, @override-extension-function="1" and @override="no" rejected -->
+
+  <xsl:function name="app:count-elements" override-extension-function="1" override="no">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/function/function-0118.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#stylesheet-functions?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+xmlns:app="http://app.com/" exclude-result-prefixes="app">
+
+  <!-- simple xsl:function, test with @identity-sensitive="Yes" (not allowed) -->
+
+  <xsl:function name="app:count-elements" identity-sensitive="Yes">
+    <xsl:param name="doc"/>
+    <xsl:sequence select="count($doc//*)"/>   
+</xsl:function>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:value-of select="app:count-elements(/)"/>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- a/tests/fn/snapshot/_snapshot-test-set.xml	Tue Aug 19 14:31:52 2014 +0100
+++ b/tests/fn/snapshot/_snapshot-test-set.xml	Tue Aug 19 14:34:23 2014 +0100
@@ -150,4 +150,34 @@
       </result>
    </test-case> 
    
+   <test-case name="snapshot-0106">
+      <description>Compare actual snapshot() results with the implementation in the spec; test identity-senstive="false" for xsl:function</description>
+      <created by="Debbie Lockett" on="2014-08-15"/>
+      <environment ref="snapshot-01"/>   
+      <test>
+         <stylesheet file="snapshot-0106.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <assert>/out</assert>
+            <assert>not(/out/wrong)</assert>
+         </all-of>
+      </result>
+   </test-case>
+   
+   <test-case name="snapshot-0107">
+      <description>Compare actual snapshot() results with the implementation in the spec; test identity-senstive=" 0 " for xsl:function</description>
+      <created by="Debbie Lockett" on="2014-08-15"/>
+      <environment ref="snapshot-01"/>   
+      <test>
+         <stylesheet file="snapshot-0107.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <assert>/out</assert>
+            <assert>not(/out/wrong)</assert>
+         </all-of>
+      </result>
+   </test-case>
+   
 </test-set>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/fn/snapshot/snapshot-0106.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,96 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+ xmlns:f="http://example.com/functions" 
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ exclude-result-prefixes="f xs">
+ 
+<!-- Test that the results of the fn:snapshot function are equivalent to the 
+ implementation given in the XSLT spec; test identity-senstive="false" for xsl:function -->
+ 
+<xsl:template match="/">
+ <out>
+  <xsl:for-each select="* (:descendant::node()/(. | @* | namespace::*) :)">
+    <xsl:if test="not(deep-equal(snapshot(.), f:snapshot(.)) 
+                       and deep-equal(snapshot(.)/root(), f:snapshot(.)/root()))"> 
+      <wrong node="{generate-id(.)}">
+        <actual><xsl:sequence select="snapshot(.)/root()"/></actual>
+        <expected><xsl:sequence select="f:snapshot(.)/root()"/></expected>
+      </wrong>
+    </xsl:if>
+  </xsl:for-each>
+ </out>
+</xsl:template> 
+ 
+
+
+<!-- Following functions are the implementation of fn:snapshot defined in the XSLT 3.0 spec -->
+
+  <xsl:function name="f:snapshot" as="node()?" identity-sensitive="false">
+  <xsl:param name="origin" as="node()?"/>
+  
+  <!-- create a copy of the tree containing the supplied node, retaining only
+       * the supplied node with its attributes and namespaces
+       * the ancestors of the supplied node with their attributes and namespaces
+       * the descendants of the supplied node with their attributes and namespaces
+       -->
+  <xsl:variable name="root-copy" as="node()">
+    <xsl:apply-templates select="root($origin)" mode="snapshot">
+      <xsl:with-param name="origin" select="$origin" tunnel="yes"/>
+    </xsl:apply-templates>
+  </xsl:variable>
+  
+  <!-- find and return the node in the copied tree that corresponds to the origin node
+       --> 
+  <xsl:sequence select="$root-copy/descendant-or-self::node()/(.|@*|namespace::*)
+      [f:corresponds(., $origin)]"/>
+</xsl:function>
+
+<xsl:template match="." mode="snapshot">
+  <xsl:param name="origin" as="node()" tunnel="yes"/>
+  <xsl:choose>
+    <xsl:when test=". is $origin">
+      <xsl:copy-of select="." validation="preserve"/>
+    </xsl:when>
+    <xsl:when test=". intersect $origin/ancestor::node()">
+      <xsl:copy validation="strip">
+        <xsl:copy-of select="@*" validation="preserve"/>
+        <xsl:apply-templates mode="snapshot"/>
+      </xsl:copy>
+    </xsl:when>
+    <xsl:otherwise/>
+  </xsl:choose>
+</xsl:template>
+
+<!-- f:corresponds compares two nodes and returns true if all the following are true:
+     * they are at the same depth in their respective trees
+     * they have the same name (or none)
+     * they have the same node kind
+     The tests on node name and node kind are needed only when the origin node is an
+     attribute or namespace.
+     -->
+<xsl:function name="f:corresponds" as="xs:boolean">
+  <xsl:param name="node1" as="node()"/>
+  <xsl:param name="node2" as="node()"/>
+  <xsl:sequence select="
+    count($node1/ancestor::node()) = count($node2/ancestor::node()) and
+    deep-equal(node-name($node1), node-name($node2)) and
+    f:node-kind($node1) = f:node-kind($node2)"/>    
+</xsl:function>
+
+<!-- f:node-kind returns a string identifying the node kind of the supplied node
+     -->
+<xsl:function name="f:node-kind" as="xs:string">
+  <xsl:param name="node" as="node()"/>
+  <xsl:choose>
+    <xsl:when test="$node instance of document-node()">D</xsl:when>
+    <xsl:when test="$node instance of element(*)">E</xsl:when>
+    <xsl:when test="$node instance of attribute(*)">A</xsl:when>
+    <xsl:when test="$node instance of text()">T</xsl:when>
+    <xsl:when test="$node instance of comment()">C</xsl:when>
+    <xsl:when test="$node instance of processing-instruction()">P</xsl:when>
+    <xsl:when test="$node instance of namespace-node()">N</xsl:when>
+  </xsl:choose>
+</xsl:function>
+
+
+
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/fn/snapshot/snapshot-0107.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,96 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+ xmlns:f="http://example.com/functions" 
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ exclude-result-prefixes="f xs">
+ 
+<!-- Test that the results of the fn:snapshot function are equivalent to the 
+ implementation given in the XSLT spec; test identity-senstive=" 0 " for xsl:function -->
+ 
+<xsl:template match="/">
+ <out>
+  <xsl:for-each select="* (:descendant::node()/(. | @* | namespace::*) :)">
+    <xsl:if test="not(deep-equal(snapshot(.), f:snapshot(.)) 
+                       and deep-equal(snapshot(.)/root(), f:snapshot(.)/root()))"> 
+      <wrong node="{generate-id(.)}">
+        <actual><xsl:sequence select="snapshot(.)/root()"/></actual>
+        <expected><xsl:sequence select="f:snapshot(.)/root()"/></expected>
+      </wrong>
+    </xsl:if>
+  </xsl:for-each>
+ </out>
+</xsl:template> 
+ 
+
+
+<!-- Following functions are the implementation of fn:snapshot defined in the XSLT 3.0 spec -->
+
+  <xsl:function name="f:snapshot" as="node()?" identity-sensitive=" 0 ">
+  <xsl:param name="origin" as="node()?"/>
+  
+  <!-- create a copy of the tree containing the supplied node, retaining only
+       * the supplied node with its attributes and namespaces
+       * the ancestors of the supplied node with their attributes and namespaces
+       * the descendants of the supplied node with their attributes and namespaces
+       -->
+  <xsl:variable name="root-copy" as="node()">
+    <xsl:apply-templates select="root($origin)" mode="snapshot">
+      <xsl:with-param name="origin" select="$origin" tunnel="yes"/>
+    </xsl:apply-templates>
+  </xsl:variable>
+  
+  <!-- find and return the node in the copied tree that corresponds to the origin node
+       --> 
+  <xsl:sequence select="$root-copy/descendant-or-self::node()/(.|@*|namespace::*)
+      [f:corresponds(., $origin)]"/>
+</xsl:function>
+
+<xsl:template match="." mode="snapshot">
+  <xsl:param name="origin" as="node()" tunnel="yes"/>
+  <xsl:choose>
+    <xsl:when test=". is $origin">
+      <xsl:copy-of select="." validation="preserve"/>
+    </xsl:when>
+    <xsl:when test=". intersect $origin/ancestor::node()">
+      <xsl:copy validation="strip">
+        <xsl:copy-of select="@*" validation="preserve"/>
+        <xsl:apply-templates mode="snapshot"/>
+      </xsl:copy>
+    </xsl:when>
+    <xsl:otherwise/>
+  </xsl:choose>
+</xsl:template>
+
+<!-- f:corresponds compares two nodes and returns true if all the following are true:
+     * they are at the same depth in their respective trees
+     * they have the same name (or none)
+     * they have the same node kind
+     The tests on node name and node kind are needed only when the origin node is an
+     attribute or namespace.
+     -->
+<xsl:function name="f:corresponds" as="xs:boolean">
+  <xsl:param name="node1" as="node()"/>
+  <xsl:param name="node2" as="node()"/>
+  <xsl:sequence select="
+    count($node1/ancestor::node()) = count($node2/ancestor::node()) and
+    deep-equal(node-name($node1), node-name($node2)) and
+    f:node-kind($node1) = f:node-kind($node2)"/>    
+</xsl:function>
+
+<!-- f:node-kind returns a string identifying the node kind of the supplied node
+     -->
+<xsl:function name="f:node-kind" as="xs:string">
+  <xsl:param name="node" as="node()"/>
+  <xsl:choose>
+    <xsl:when test="$node instance of document-node()">D</xsl:when>
+    <xsl:when test="$node instance of element(*)">E</xsl:when>
+    <xsl:when test="$node instance of attribute(*)">A</xsl:when>
+    <xsl:when test="$node instance of text()">T</xsl:when>
+    <xsl:when test="$node instance of comment()">C</xsl:when>
+    <xsl:when test="$node instance of processing-instruction()">P</xsl:when>
+    <xsl:when test="$node instance of namespace-node()">N</xsl:when>
+  </xsl:choose>
+</xsl:function>
+
+
+
+</xsl:stylesheet>
\ No newline at end of file
--- a/tests/insn/merge/_merge-test-set.xml	Tue Aug 19 14:31:52 2014 +0100
+++ b/tests/insn/merge/_merge-test-set.xml	Tue Aug 19 14:34:23 2014 +0100
@@ -902,5 +902,82 @@
       </result>
    </test-case>
    
+   <test-case name="merge-059">
+      <description>Test xsl:merge-source with sort-before-merge=" no ".</description>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="merge008"/>
+      <dependencies/>
+      <test>
+         <stylesheet file="merge-059.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="merge-018.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="merge-060">
+      <description>Test xsl:merge-source with sort-before-merge="true" and "false".</description>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="merge008"/>
+      <dependencies/>
+      <test>
+         <stylesheet file="merge-060.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="merge-018.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="merge-061">
+      <description>Test xsl:merge-source with sort-before-merge="1" and "0".</description>
+      <created by="Debbie Lockett" on="2014-08-13"/>
+      <environment ref="merge008"/>
+      <dependencies/>
+      <test>
+         <stylesheet file="merge-061.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="merge-018.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="merge-062">
+      <description>xsl:merge test on two heterogeneous files, using for-each-stream and streamable=" no ".</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="merge002"/>
+      <dependencies/>
+      <test>
+         <stylesheet file="merge-062.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="merge-002.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="merge-063">
+      <description>xsl:merge test on two heterogeneous files, using for-each-stream, and streamable="false" and "0".</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="merge002"/>
+      <dependencies/>
+      <test>
+         <stylesheet file="merge-063.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="merge-002.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="merge-064">
+      <description>xsl:merge test on two heterogeneous files, using for-each-stream and streamable="No" (not allowed).</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="merge002"/>
+      <dependencies/>
+      <test>
+         <stylesheet file="merge-064.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
 
 </test-set>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/merge/merge-059.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,33 @@
+<?xml version="1.0"?> 
+<?spec xslt#sorting?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+    xmlns:s="http://s.com/" exclude-result-prefixes="s">
+    
+    <!-- PURPOSE: Test xsl:merge-source with sort-before-merge=" no ".  -->
+    
+    <xsl:output indent="no"/>
+    
+    <xsl:template match="/">
+        <out>
+            <xsl:merge>
+                
+                <xsl:merge-source 
+                	select="doc('europe.xml')/europe/country" 
+                	sort-before-merge=" yes ">
+                        <xsl:merge-key select="." />
+                </xsl:merge-source>
+                
+                
+                <xsl:merge-source select="doc('america.xml')/america/country"
+                    sort-before-merge=" no ">
+                    <xsl:merge-key select="." />          
+                </xsl:merge-source>
+                <xsl:merge-action>
+                        <xsl:copy-of select="current-merge-group()"/>
+                </xsl:merge-action>
+            </xsl:merge>
+        </out>
+        
+       
+    </xsl:template>
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/merge/merge-060.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,33 @@
+<?xml version="1.0"?> 
+<?spec xslt#sorting?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+    xmlns:s="http://s.com/" exclude-result-prefixes="s">
+    
+    <!-- PURPOSE: Test xsl:merge-source with sort-before-merge="true" and "false".  -->
+    
+    <xsl:output indent="no"/>
+    
+    <xsl:template match="/">
+        <out>
+            <xsl:merge>
+                
+                <xsl:merge-source 
+                	select="doc('europe.xml')/europe/country" 
+                	sort-before-merge="true">
+                        <xsl:merge-key select="." />
+                </xsl:merge-source>
+                
+                
+                <xsl:merge-source select="doc('america.xml')/america/country"
+                    sort-before-merge="false">
+                    <xsl:merge-key select="." />          
+                </xsl:merge-source>
+                <xsl:merge-action>
+                        <xsl:copy-of select="current-merge-group()"/>
+                </xsl:merge-action>
+            </xsl:merge>
+        </out>
+        
+       
+    </xsl:template>
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/merge/merge-061.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,33 @@
+<?xml version="1.0"?> 
+<?spec xslt#sorting?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
+    xmlns:s="http://s.com/" exclude-result-prefixes="s">
+    
+    <!-- PURPOSE: Test xsl:merge-source with sort-before-merge="1" and "0".  -->
+    
+    <xsl:output indent="no"/>
+    
+    <xsl:template match="/">
+        <out>
+            <xsl:merge>
+                
+                <xsl:merge-source 
+                	select="doc('europe.xml')/europe/country" 
+                	sort-before-merge="1">
+                        <xsl:merge-key select="." />
+                </xsl:merge-source>
+                
+                
+                <xsl:merge-source select="doc('america.xml')/america/country"
+                    sort-before-merge="0">
+                    <xsl:merge-key select="." />          
+                </xsl:merge-source>
+                <xsl:merge-action>
+                        <xsl:copy-of select="current-merge-group()"/>
+                </xsl:merge-action>
+            </xsl:merge>
+        </out>
+        
+       
+    </xsl:template>
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/merge/merge-062.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="xs"
+    version="3.0">
+    <!-- xsl:merge test on two heterogeneous files, using for-each-stream and streamable=" no ". -->
+    
+    <xsl:output method="xml" indent="no"/>
+    <xsl:strip-space elements="*"/>
+    <xsl:template match="/">
+        
+        <events>
+            <xsl:merge>
+                <xsl:merge-source for-each-stream="'log-file-1.xml'" select="events/event" streamable=" no ">
+                        <xsl:merge-key select="xs:dateTime(@timestamp)"/>
+                </xsl:merge-source>
+                <xsl:merge-source for-each-stream="'log-file-2.xml'" select="log/day/record" streamable="no">
+                        <xsl:merge-key select="dateTime(../@date, time)"/>
+                </xsl:merge-source>
+                <xsl:merge-action>
+                    <group>
+                        <xsl:copy-of select="current-merge-group()" />
+                    </group>
+                </xsl:merge-action>
+            </xsl:merge>
+        </events>
+        
+    </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/merge/merge-063.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="xs"
+    version="3.0">
+    <!-- xsl:merge test on two heterogeneous files, using for-each-stream, and streamable="false" and "0". -->
+    
+    <xsl:output method="xml" indent="no"/>
+    <xsl:strip-space elements="*"/>
+    <xsl:template match="/">
+        
+        <events>
+            <xsl:merge>
+                <xsl:merge-source for-each-stream="'log-file-1.xml'" select="events/event" streamable="false">
+                        <xsl:merge-key select="xs:dateTime(@timestamp)"/>
+                </xsl:merge-source>
+                <xsl:merge-source for-each-stream="'log-file-2.xml'" select="log/day/record" streamable="0">
+                        <xsl:merge-key select="dateTime(../@date, time)"/>
+                </xsl:merge-source>
+                <xsl:merge-action>
+                    <group>
+                        <xsl:copy-of select="current-merge-group()" />
+                    </group>
+                </xsl:merge-action>
+            </xsl:merge>
+        </events>
+        
+    </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/merge/merge-064.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="xs"
+    version="3.0">
+    <!-- xsl:merge test on two heterogeneous files, using for-each-stream, and streamable="No" (not allowed). -->
+    
+    <xsl:output method="xml" indent="no"/>
+    <xsl:strip-space elements="*"/>
+    <xsl:template match="/">
+        
+        <events>
+            <xsl:merge>
+                <xsl:merge-source for-each-stream="'log-file-1.xml'" select="events/event" streamable="No">
+                        <xsl:merge-key select="xs:dateTime(@timestamp)"/>
+                </xsl:merge-source>
+                <xsl:merge-source for-each-stream="'log-file-2.xml'" select="log/day/record" streamable="no">
+                        <xsl:merge-key select="dateTime(../@date, time)"/>
+                </xsl:merge-source>
+                <xsl:merge-action>
+                    <group>
+                        <xsl:copy-of select="current-merge-group()" />
+                    </group>
+                </xsl:merge-action>
+            </xsl:merge>
+        </events>
+        
+    </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- a/tests/strm/si-LRE/_si-lre-test-set.xml	Tue Aug 19 14:31:52 2014 +0100
+++ b/tests/strm/si-LRE/_si-lre-test-set.xml	Tue Aug 19 14:34:23 2014 +0100
@@ -344,7 +344,7 @@
       <result>
          <assert>/out/a</assert>
       </result>
-   </test-case>
+   </test-case> 
    
    <test-case name="si-lre-101">
       <description>Use literal result element: schema-aware, validation=strict</description>
@@ -1157,7 +1157,42 @@
          <error code="XTSE3430"/>
       </result>
    </test-case>
-  
-  
+   
+   <test-case name="si-lre-904">
+      <description>Use literal result element: uses a streamable attribute set with streamable=" true "</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <test>
+         <stylesheet file="si-lre-904.xsl"/>
+         <initial-template name="cy-904"/>
+      </test>
+      <result>
+         <assert>/out/*[@x='1' and @y='2']</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="si-lre-905">
+      <description>Use literal result element: uses a streamable attribute set with streamable="1"</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <test>
+         <stylesheet file="si-lre-905.xsl"/>
+         <initial-template name="cy-905"/>
+      </test>
+      <result>
+         <assert>/out/*[@x='1' and @y='2']</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="si-lre-906">
+      <description>Use literal result element, using an attribute set with streamable="Yes" (not allowed)</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <test>
+         <stylesheet file="si-lre-906.xsl"/>
+         <initial-template name="cy-906"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>     
+    
    
 </test-set>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/strm/si-LRE/si-lre-904.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,29 @@
+<xsl:transform version="3.0" 
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:map="http://www.w3.org/2005/xpath-functions/map"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="map xs">
+    
+    <xsl:variable name="RUN" select="true()" static="yes"/>
+    <xsl:strip-space elements="*"/>
+   
+  <!-- LRE referring to a streamable attribute set with streamable=" true " -->
+  
+  <xsl:attribute-set name="as-5" streamable=" true ">
+    <xsl:attribute name="x" select="1"/>
+    <xsl:attribute name="y" select="2"/>
+  </xsl:attribute-set> 
+  
+  <xsl:template name="cy-904" use-when="$RUN">
+    <out>
+      <xsl:stream href="../docs/citygml.xml">
+        <xsl:for-each select="*">
+          <dddd xsl:use-attribute-sets="as-5">
+            <xsl:sequence select="*" />
+          </dddd>
+        </xsl:for-each>  
+      </xsl:stream>
+    </out>
+  </xsl:template>
+  
+</xsl:transform>  
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/strm/si-LRE/si-lre-905.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,29 @@
+<xsl:transform version="3.0" 
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:map="http://www.w3.org/2005/xpath-functions/map"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="map xs">
+    
+    <xsl:variable name="RUN" select="true()" static="yes"/>
+    <xsl:strip-space elements="*"/>
+   
+  <!-- LRE referring to a streamable attribute set with streamable="1" -->
+  
+  <xsl:attribute-set name="as-6" streamable="1">
+    <xsl:attribute name="x" select="1"/>
+    <xsl:attribute name="y" select="2"/>
+  </xsl:attribute-set> 
+  
+  <xsl:template name="cy-905" use-when="$RUN">
+    <out>
+      <xsl:stream href="../docs/citygml.xml">
+        <xsl:for-each select="*">
+          <dddd xsl:use-attribute-sets="as-6">
+            <xsl:sequence select="*" />
+          </dddd>
+        </xsl:for-each>  
+      </xsl:stream>
+    </out>
+  </xsl:template>
+  
+</xsl:transform>  
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/strm/si-LRE/si-lre-906.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,26 @@
+<xsl:transform version="3.0" 
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:map="http://www.w3.org/2005/xpath-functions/map"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="map xs">
+    
+    <xsl:variable name="RUN" select="true()" static="yes"/>
+    <xsl:strip-space elements="*"/>
+   
+
+  <!-- LRE referring to an attribute set with streamable="Yes" (not allowed) -->
+  
+  <xsl:attribute-set name="as-4" streamable="Yes">
+    <xsl:attribute name="x" select="1"/>
+    <xsl:attribute name="y" select="2"/>
+  </xsl:attribute-set> 
+   
+  <xsl:template name="cy-906" use-when="$RUN">
+    <out>
+      <xsl:stream href="../docs/citygml.xml">
+        <e xsl:use-attribute-sets="as-4"/>
+      </xsl:stream>
+    </out>
+  </xsl:template>  
+  
+</xsl:transform>  
\ No newline at end of file
--- a/tests/strm/si-LRE/si-lre-A.xsl	Tue Aug 19 14:31:52 2014 +0100
+++ b/tests/strm/si-LRE/si-lre-A.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -384,8 +384,7 @@
         </xsl:for-each>  
       </xsl:stream>
     </out>
-  </xsl:template>
-  
+  </xsl:template>  
    
   
 </xsl:transform>  
\ No newline at end of file
--- a/tests/strm/si-merge/_si-merge-test-set.xml	Tue Aug 19 14:31:52 2014 +0100
+++ b/tests/strm/si-merge/_si-merge-test-set.xml	Tue Aug 19 14:34:23 2014 +0100
@@ -69,6 +69,22 @@
          <assert>count(/prices/key) = 11644</assert>
       </result>
    </test-case>
+   
+   <test-case name="si-merge-005">
+      <description>Test streamable=" true " and " 1 "; merge time-series data for gold and uranium prices.</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <test>
+         <stylesheet file="si-merge-005.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <all-of>
+            <assert>/prices/price[@date="2014-03-31"][@gold="1294.0"][@uranium="34.91"]</assert>
+            <assert>/prices/price[@date="2014-02-28"][@gold="1327.75"][@uranium="35.54"]</assert>
+            <assert>/prices/price[@date="2014-01-31"][@gold="1246.5"][@uranium="35.1"]</assert>
+         </all-of>
+      </result>
+   </test-case>
 
    
 </test-set>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/strm/si-merge/si-merge-005.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="xs"
+    version="3.0">
+    
+    <!-- Purpose: Test streamable=" true " and " 1 "; merge time-series data for gold and uranium prices. -->
+
+    <xsl:template name="main">
+        
+        <prices>
+            <xsl:merge>
+                <xsl:merge-source
+                    name="gold"
+                    streamable=" true "
+                    for-each-stream="'../docs/goldPrice.xml'" 
+                	select="dataset/data/datum">
+                        <xsl:merge-key select="xs:date(datum[1])" order="descending"/>
+                </xsl:merge-source>
+                <xsl:merge-source
+                    name="uranium" 
+                	streamable=" 1 "
+                    for-each-stream="'../docs/uraniumPrice.xml'" 
+                	select="dataset/data/datum">
+                        <xsl:merge-key select="xs:date(datum[1])" order="descending"/>
+                </xsl:merge-source>
+                <xsl:merge-action>
+                    <xsl:if test="count(current-merge-group()) = 2">
+                       <price date="{current-merge-key()}"
+                              gold="{current-merge-group('gold')/datum[2]}"
+                              uranium="{current-merge-group('uranium')/datum[2]}"/>
+                    </xsl:if>
+                </xsl:merge-action>
+            </xsl:merge>
+        </prices>
+        
+    </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- a/tests/type/namespace/_namespace-test-set.xml	Tue Aug 19 14:31:52 2014 +0100
+++ b/tests/type/namespace/_namespace-test-set.xml	Tue Aug 19 14:34:23 2014 +0100
@@ -1558,6 +1558,111 @@
          <error code="XTSE0020"/>
       </result>
    </test-case>
+   
+   <test-case name="namespace-2628">
+      <description>test inherit-namespaces="yes" on literal result elements</description>
+      <created by="Debbie Lockett" on="2014-08-15"/>
+      <environment ref="namespace-26"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+         <feature value="XML_1.1"/>
+      </dependencies>
+      <test>
+         <stylesheet file="namespace-2628.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <assert-xml xml-version="1.1"><![CDATA[<a xmlns:n="http://n/"><b xmlns:n="http://n/"/></a>]]></assert-xml>
+            <assert>/a/b/namespace::* = "http://n/"</assert> 
+         </all-of>         
+      </result>
+   </test-case>
+   
+   <test-case name="namespace-2629">
+      <description>test inherit-namespaces="true" on literal result elements</description>
+      <created by="Debbie Lockett" on="2014-08-15"/>
+      <environment ref="namespace-26"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="XML_1.1"/>
+      </dependencies>
+      <test>
+         <stylesheet file="namespace-2629.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <assert-xml xml-version="1.1"><![CDATA[<a xmlns:n="http://n/"><b xmlns:n="http://n/"/></a>]]></assert-xml>
+            <assert>/a/b/namespace::* = "http://n/"</assert> 
+         </all-of>         
+      </result>
+   </test-case>
+   
+   <test-case name="namespace-2630">
+      <description>test inherit-namespaces="1" on literal result elements</description>
+      <created by="Debbie Lockett" on="2014-08-15"/>
+      <environment ref="namespace-26"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="XML_1.1"/>
+      </dependencies>
+      <test>
+         <stylesheet file="namespace-2630.xsl"/>
+      </test>
+      <result>
+         <all-of>
+            <assert-xml xml-version="1.1"><![CDATA[<a xmlns:n="http://n/"><b xmlns:n="http://n/"/></a>]]></assert-xml>
+            <assert>/a/b/namespace::* = "http://n/"</assert> 
+         </all-of>         
+      </result>
+   </test-case>
+   
+   <test-case name="namespace-2631">
+      <description>test inherit-namespaces="false" on literal result elements</description>
+      <created by="Debbie Lockett" on="2014-08-15"/>
+      <environment ref="namespace-26"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="XML_1.1"/>
+      </dependencies>
+      <test>
+         <stylesheet file="namespace-2631.xsl"/>
+      </test>
+      <result>
+         <assert-xml xml-version="1.1"><![CDATA[<a xmlns:n="http://n/"><b xmlns:n=""/></a>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="namespace-2632">
+      <description>test inherit-namespaces="0" on literal result elements</description>
+      <created by="Debbie Lockett" on="2014-08-15"/>
+      <environment ref="namespace-26"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="XML_1.1"/>
+      </dependencies>
+      <test>
+         <stylesheet file="namespace-2632.xsl"/>
+      </test>
+      <result>
+         <assert-xml xml-version="1.1"><![CDATA[<a xmlns:n="http://n/"><b xmlns:n=""/></a>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="namespace-2633">
+      <description>test inherit-namespaces=" " (not allowed) on literal result elements</description>
+      <created by="Debbie Lockett" on="2014-08-15"/>
+      <environment ref="namespace-26"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="XML_1.1"/>
+      </dependencies>
+      <test>
+         <stylesheet file="namespace-2633.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-2628.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+
+<!-- test inherit-namespaces=" yes " on literal result elements -->
+
+
+<xsl:output method="xml" version="1.1" undeclare-prefixes="yes"/>
+
+<xsl:template match = "/">
+  <a xmlns:n="http://n/" xsl:inherit-namespaces=" yes ">
+    <xsl:call-template name="c"/>
+  </a>
+</xsl:template>
+
+<xsl:template name="c">
+  <b/>  
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/type/namespace/namespace-2629.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<!-- test inherit-namespaces="true" on literal result elements -->
+
+
+<xsl:output method="xml" version="1.1" undeclare-prefixes="yes"/>
+
+<xsl:template match = "/">
+  <a xmlns:n="http://n/" xsl:inherit-namespaces="true">
+    <xsl:call-template name="c"/>
+  </a>
+</xsl:template>
+
+<xsl:template name="c">
+  <b/>  
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/type/namespace/namespace-2630.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<!-- test inherit-namespaces="1" on literal result elements -->
+
+
+<xsl:output method="xml" version="1.1" undeclare-prefixes="yes"/>
+
+<xsl:template match = "/">
+  <a xmlns:n="http://n/" xsl:inherit-namespaces="1">
+    <xsl:call-template name="c"/>
+  </a>
+</xsl:template>
+
+<xsl:template name="c">
+  <b/>  
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/type/namespace/namespace-2631.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<!-- test inherit-namespaces="false" on literal result elements -->
+
+
+<xsl:output method="xml" version="1.1" undeclare-prefixes="yes"/>
+
+<xsl:template match = "/">
+  <a xmlns:n="http://n/" xsl:inherit-namespaces="false">
+    <xsl:call-template name="c"/>
+  </a>
+</xsl:template>
+
+<xsl:template name="c">
+  <b/>  
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/type/namespace/namespace-2632.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<!-- test inherit-namespaces="0" on literal result elements -->
+
+
+<xsl:output method="xml" version="1.1" undeclare-prefixes="yes"/>
+
+<xsl:template match = "/">
+  <a xmlns:n="http://n/" xsl:inherit-namespaces="0">
+    <xsl:call-template name="c"/>
+  </a>
+</xsl:template>
+
+<xsl:template name="c">
+  <b/>  
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/type/namespace/namespace-2633.xsl	Tue Aug 19 14:34:23 2014 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<!-- test inherit-namespaces=" " on literal result elements -->
+
+
+<xsl:output method="xml" version="1.1" undeclare-prefixes="yes"/>
+
+<xsl:template match = "/">
+  <a xmlns:n="http://n/" xsl:inherit-namespaces=" ">
+    <xsl:call-template name="c"/>
+  </a>
+</xsl:template>
+
+<xsl:template name="c">
+  <b/>  
+</xsl:template>
+
+</xsl:stylesheet>