Renumber whitespace and strip-space/preserve-space tests, and rename/renumber associated files
authorabraaksm
Fri, 03 Apr 2015 04:16:02 +0200
changeset 914 a537f0f5cca2
parent 913 c02c6346e1b8
child 915 06595e9e7145
Renumber whitespace and strip-space/preserve-space tests, and rename/renumber associated files
tests/decl/strip-space/_strip-space-test-set.xml
tests/decl/strip-space/environment-04.xml
tests/decl/strip-space/environment-05.xml
tests/decl/strip-space/environment-06.xml
tests/decl/strip-space/environment-06.xsd
tests/decl/strip-space/environment-09.xml
tests/decl/strip-space/strip-space-001.xsl
tests/decl/strip-space/strip-space-002.xsl
tests/decl/strip-space/strip-space-003.out
tests/decl/strip-space/strip-space-003.xsl
tests/decl/strip-space/strip-space-004.out
tests/decl/strip-space/strip-space-004.xsl
tests/decl/strip-space/strip-space-005.out
tests/decl/strip-space/strip-space-005.xsl
tests/decl/strip-space/strip-space-006.out
tests/decl/strip-space/strip-space-006.xsl
tests/decl/strip-space/strip-space-007.xsl
tests/decl/strip-space/strip-space-008.xsl
tests/decl/strip-space/strip-space-009.xml
tests/decl/strip-space/strip-space-009.xsd
tests/decl/strip-space/strip-space-009.xsl
tests/decl/strip-space/strip-space-010.xsl
tests/decl/strip-space/strip-space-011.xsl
tests/decl/strip-space/strip-space-0114.xsl
tests/decl/strip-space/strip-space-0115.xsl
tests/decl/strip-space/strip-space-012.xsl
tests/decl/strip-space/strip-space-013.xsl
tests/decl/strip-space/strip-space-014.xsl
tests/decl/strip-space/strip-space-015.xsl
tests/decl/strip-space/strip-space-016.xsl
tests/decl/strip-space/strip-space-017.xsl
tests/decl/strip-space/strip-space-018.xsl
tests/decl/strip-space/strip-space-019.xsl
tests/decl/strip-space/strip-space-020.xsl
tests/decl/strip-space/strip-space-020a.xsl
tests/decl/strip-space/strip-space-021.xsl
tests/decl/strip-space/strip-space-022.out
tests/decl/strip-space/strip-space-022.xsl
tests/decl/strip-space/strip-space-04.xml
tests/decl/strip-space/strip-space-0401.out
tests/decl/strip-space/strip-space-0401.xsl
tests/decl/strip-space/strip-space-0402.out
tests/decl/strip-space/strip-space-0402.xsl
tests/decl/strip-space/strip-space-05.xml
tests/decl/strip-space/strip-space-0501.out
tests/decl/strip-space/strip-space-0501.xsl
tests/decl/strip-space/strip-space-0502.out
tests/decl/strip-space/strip-space-0502.xsl
tests/decl/strip-space/strip-space-06.xml
tests/decl/strip-space/strip-space-06.xsd
tests/decl/strip-space/strip-space-0601.xsl
tests/decl/strip-space/strip-space-0602.xsl
tests/decl/strip-space/strip-space-0603.xsl
tests/decl/strip-space/strip-space-06a.xml
tests/decl/strip-space/strip-space-06a.xsd
tests/decl/strip-space/strip-space-0701.xsl
tests/decl/strip-space/strip-space-0702.xsl
tests/decl/strip-space/strip-space-0703.xsl
tests/decl/strip-space/strip-space-0704.xsl
tests/decl/strip-space/strip-space-0801.xsl
tests/decl/strip-space/strip-space-09.xml
tests/decl/strip-space/strip-space-0901.xsl
tests/decl/strip-space/strip-space-0902.xsl
tests/decl/strip-space/strip-space-1101.xsl
tests/decl/strip-space/strip-space-1401.xsl
tests/decl/strip-space/strip-space-1501.xsl
tests/decl/strip-space/strip-space-1601.xsl
tests/decl/strip-space/strip-space-1601a.xsl
tests/decl/strip-space/strip-space-1704.xsl
tests/decl/strip-space/strip-space-1801.out
tests/decl/strip-space/strip-space-1801.xsl
tests/misc/whitespace/_whitespace-test-set.xml
tests/misc/whitespace/whitespace-001.xsl
tests/misc/whitespace/whitespace-002.xsl
tests/misc/whitespace/whitespace-003.xsl
tests/misc/whitespace/whitespace-004.xsl
tests/misc/whitespace/whitespace-005.xsl
tests/misc/whitespace/whitespace-006.xsl
tests/misc/whitespace/whitespace-007.xsl
tests/misc/whitespace/whitespace-008.xsl
tests/misc/whitespace/whitespace-009.xsl
tests/misc/whitespace/whitespace-010.xsl
tests/misc/whitespace/whitespace-0101.xsl
tests/misc/whitespace/whitespace-0102.xsl
tests/misc/whitespace/whitespace-0103.xsl
tests/misc/whitespace/whitespace-0104.xsl
tests/misc/whitespace/whitespace-0105.xsl
tests/misc/whitespace/whitespace-0106.xsl
tests/misc/whitespace/whitespace-0107.xsl
tests/misc/whitespace/whitespace-0108.xsl
tests/misc/whitespace/whitespace-0109.xsl
tests/misc/whitespace/whitespace-011.xsl
tests/misc/whitespace/whitespace-0110.xsl
tests/misc/whitespace/whitespace-0111.xsl
tests/misc/whitespace/whitespace-0112.xsl
tests/misc/whitespace/whitespace-0113.xsl
tests/misc/whitespace/whitespace-012.xsl
tests/misc/whitespace/whitespace-013.xsl
tests/misc/whitespace/whitespace-014.xsl
tests/misc/whitespace/whitespace-015.xsl
tests/misc/whitespace/whitespace-016.xsl
tests/misc/whitespace/whitespace-017.xsl
tests/misc/whitespace/whitespace-018.xsl
tests/misc/whitespace/whitespace-019.xsl
tests/misc/whitespace/whitespace-020.xsl
tests/misc/whitespace/whitespace-0201.xsl
tests/misc/whitespace/whitespace-021.xsl
tests/misc/whitespace/whitespace-022.xsl
tests/misc/whitespace/whitespace-023.xsl
tests/misc/whitespace/whitespace-024.xsl
tests/misc/whitespace/whitespace-025.xsl
tests/misc/whitespace/whitespace-026.xsl
tests/misc/whitespace/whitespace-027.xsl
tests/misc/whitespace/whitespace-028.xsl
tests/misc/whitespace/whitespace-0301.xsl
tests/misc/whitespace/whitespace-1001.xsl
tests/misc/whitespace/whitespace-1002.xsl
tests/misc/whitespace/whitespace-1003.xsl
tests/misc/whitespace/whitespace-1004.xsl
tests/misc/whitespace/whitespace-1005.xsl
tests/misc/whitespace/whitespace-1201.xsl
tests/misc/whitespace/whitespace-1202.xsl
tests/misc/whitespace/whitespace-1203.xsl
tests/misc/whitespace/whitespace-1301.xsl
tests/misc/whitespace/whitespace-1701.xsl
tests/misc/whitespace/whitespace-1702.xsl
tests/misc/whitespace/whitespace-1703.xsl
tests/misc/whitespace/whitespace-1705.xsl
--- a/tests/decl/strip-space/_strip-space-test-set.xml	Fri Apr 03 03:20:42 2015 +0200
+++ b/tests/decl/strip-space/_strip-space-test-set.xml	Fri Apr 03 04:16:02 2015 +0200
@@ -23,16 +23,16 @@
       </source>
    </environment>
    <environment name="strip-space-04">
-      <source role="." file="strip-space-04.xml"/>
+      <source role="." file="environment-04.xml"/>
    </environment>
 
    <environment name="strip-space-05">
-      <source role="." file="strip-space-05.xml"/>
+      <source role="." file="environment-05.xml"/>
    </environment>
 
    <environment name="strip-space-06">
-      <source role="." file="strip-space-06.xml" validation="strict"/>
-      <schema role="source-reference" file="strip-space-06.xsd" xsd-version="1.0"/>
+      <source role="." file="environment-06.xml" validation="strict"/>
+      <schema role="source-reference" file="environment-06.xsd" xsd-version="1.0"/>
    </environment>
 
    <environment name="strip-space-07">
@@ -53,7 +53,7 @@
    </environment>
 
    <environment name="strip-space-09">
-      <source role="." file="strip-space-09.xml"/>
+      <source role="." file="environment-09.xml"/>
    </environment>
 
    <environment name="strip-space-17">
@@ -64,17 +64,20 @@
       </source>
    </environment>
 
-   <test-case name="strip-space-0114">
-      <description> Test with an element constructed with whitespace text node children. The element
+   <test-case name="strip-space-001">
+      <description>
+         Was: whitespace-0114
+         Test with an element constructed with whitespace text node children. The element
          is stored in a variable and its name is listed in xsl:strip-space. Confirm that the element
-         has a text node child. </description>
+         has a text node child. 
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="strip-space-01"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0114.xsl"/>
+         <stylesheet file="strip-space-001.xsl"/>
       </test>
       <result>
          <all-of>
@@ -84,24 +87,30 @@
       </result>
    </test-case>
 
-   <test-case name="strip-space-0115">
-      <description> In xsl:strip-space, prefix of nametest must be declared </description>
+   <test-case name="strip-space-002">
+      <description>
+         Was: whitespace-0115
+         In xsl:strip-space, prefix of nametest must be declared 
+      </description>
       <created by="Michael Kay" on="2013-09-22"/>
       <environment ref="strip-space-01"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0115.xsl"/>
+         <stylesheet file="strip-space-002.xsl"/>
       </test>
       <result>
          <error code="XTSE0280"/>
       </result>
    </test-case>
 
-   <test-case name="strip-space-0401">
-      <description> Test xsl:preserve-space with @elements="*:NCName". Template rules have
-         match="*", match="*:NCName" and match="QName" </description>
+   <test-case name="strip-space-003">
+      <description>
+         Was: whitespace-0401
+         Test xsl:preserve-space with @elements="*:NCName". Template rules have
+         match="*", match="*:NCName" and match="QName" 
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
       <environment ref="strip-space-04"/>
@@ -109,17 +118,20 @@
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0401.xsl"/>
+         <stylesheet file="strip-space-003.xsl"/>
          <output serialize="yes"/>
       </test>
       <result>
-         <assert-serialization method="xml" file="strip-space-0401.out"/>
+         <assert-serialization method="xml" file="strip-space-003.out"/>
       </result>
    </test-case>
 
-   <test-case name="strip-space-0402">
-      <description> Test xsl:strip-space with @elements="*:NCName". Template rules have match="*",
-         match="*:NCName" and match="QName". </description>
+   <test-case name="strip-space-004">
+      <description>
+         Was: whitespace-0402
+         Test xsl:strip-space with @elements="*:NCName". Template rules have match="*",
+         match="*:NCName" and match="QName".
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
       <environment ref="strip-space-04"/>
@@ -127,17 +139,20 @@
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0402.xsl"/>
+         <stylesheet file="strip-space-004.xsl"/>
          <output serialize="yes"/>
       </test>
       <result>
-         <assert-serialization method="xml" file="strip-space-0402.out"/>
+         <assert-serialization method="xml" file="strip-space-004.out"/>
       </result>
    </test-case>
 
-   <test-case name="strip-space-0501">
-      <description> Test xsl:preserve-space with @elements="NCName:*". Template rules have
-         match="*", match="NCName:* and match="QName". </description>
+   <test-case name="strip-space-005">
+      <description>
+         Was: whitespace-0501
+         Test xsl:preserve-space with @elements="NCName:*". Template rules have
+         match="*", match="NCName:* and match="QName".
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
       <environment ref="strip-space-05"/>
@@ -145,17 +160,20 @@
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0501.xsl"/>
+         <stylesheet file="strip-space-005.xsl"/>
          <output serialize="yes"/>
       </test>
       <result>
-         <assert-serialization method="xml" file="strip-space-0501.out"/>
+         <assert-serialization method="xml" file="strip-space-005.out"/>
       </result>
    </test-case>
 
-   <test-case name="strip-space-0502">
-      <description>Test xsl:strip-space with @elements="NCName:*". Template rules have match="*" ,
-         match="NCName:* and match="QName".</description>
+   <test-case name="strip-space-006">
+      <description>
+         Was: whitespace-0502
+         Test xsl:strip-space with @elements="NCName:*". Template rules have match="*" ,
+         match="NCName:* and match="QName".
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
       <environment ref="strip-space-05"/>
@@ -163,17 +181,20 @@
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0502.xsl"/>
+         <stylesheet file="strip-space-006.xsl"/>
          <output serialize="yes"/>
       </test>
       <result>
-         <assert-serialization method="xml" file="strip-space-0502.out"/>
+         <assert-serialization method="xml" file="strip-space-006.out"/>
       </result>
    </test-case>
 
-   <test-case name="strip-space-0601">
-      <description> Test that whitespace text nodes are stripped from elements with element only
-         content regardless of xsl:preserve-space or xsl:strip-space.</description>
+   <test-case name="strip-space-007">
+      <description>
+         Was: whitespace-0601
+         Test that whitespace text nodes are stripped from elements with element only
+         content regardless of xsl:preserve-space or xsl:strip-space.
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="strip-space-06"/>
       <dependencies>
@@ -181,16 +202,19 @@
          <feature value="schema_aware"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0601.xsl"/>
+         <stylesheet file="strip-space-007.xsl"/>
       </test>
       <result>
          <assert>/ok</assert>
       </result>
    </test-case>
 
-   <test-case name="strip-space-0602">
-      <description> Test that whitespace text nodes are not stripped from elements with simple
-         content regardless of xsl:preserve-space or xsl:strip-space.</description>
+   <test-case name="strip-space-008">
+      <description>
+         Was: whitespace-0602
+         Test that whitespace text nodes are not stripped from elements with simple
+         content regardless of xsl:preserve-space or xsl:strip-space.
+      </description>
       <created by="Michael Kay" on="2012-12-07"/>
       <environment ref="strip-space-06"/>
       <dependencies>
@@ -198,20 +222,22 @@
          <feature value="schema_aware"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0602.xsl"/>
+         <stylesheet file="strip-space-008.xsl"/>
       </test>
       <result>
          <assert>/ok</assert>
       </result>
    </test-case>
 
-   <test-case name="strip-space-0603">
-      <description> Test that whitespace text nodes are not stripped from elements having an
+   <test-case name="strip-space-009">
+      <description>
+         Was: whitespace-0603
+         Test that whitespace text nodes are not stripped from elements having an
          ancestor whose governing type contains an XSD 1.1 assertion. </description>
       <created by="Michael Kay" on="2012-12-07"/>
       <environment>
-         <source role="." file="strip-space-06a.xml" uri="strip-space-06a.xml" validation="strict"/>
-         <schema file="strip-space-06a.xsd" uri="strip-space-06a.xsd" role="source-reference"
+         <source role="." file="strip-space-009.xml" uri="strip-space-009.xml" validation="strict"/>
+         <schema file="strip-space-009.xsd" uri="strip-space-009.xsd" role="source-reference"
             xsd-version="1.1"/>
       </environment>
       <dependencies>
@@ -220,22 +246,25 @@
          <feature value="XSD_1.1"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0603.xsl"/>
+         <stylesheet file="strip-space-009.xsl"/>
       </test>
       <result>
          <assert>/ok</assert>
       </result>
    </test-case>
 
-   <test-case name="strip-space-0701">
-      <description>Another Test for white-space</description>
+   <test-case name="strip-space-010">
+      <description>
+         Was: whitespace-0701
+         Another Test for white-space
+      </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="strip-space-07"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0701.xsl"/>
+         <stylesheet file="strip-space-010.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out>ab
@@ -245,46 +274,54 @@
       </result>
    </test-case>
 
-   <test-case name="strip-space-0702">
-      <description>Another Test for white-space (xsl:strip-space)</description>
+   <test-case name="strip-space-011">
+      <description>
+         Was: whitespace-0702
+         Another Test for white-space (xsl:strip-space)
+      </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="strip-space-07"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0702.xsl"/>
+         <stylesheet file="strip-space-011.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out>abcd</out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="strip-space-0703">
-      <description>Another Test for white-space</description>
+   <test-case name="strip-space-012">
+      <description>
+         Was: whitespace-0703
+         Another Test for white-space
+      </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="strip-space-07"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0703.xsl"/>
+         <stylesheet file="strip-space-012.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out>abcd</out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="strip-space-0704">
-      <description>Another Test for white-space (xsl:strip-space and
-         xsl:preserve-space)</description>
+   <test-case name="strip-space-013">
+      <description>
+         Was: whitespace-0704
+         Another Test for white-space (xsl:strip-space and xsl:preserve-space)
+      </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="strip-space-07"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0704.xsl"/>
+         <stylesheet file="strip-space-013.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out>ab
@@ -294,8 +331,11 @@
       </result>
    </test-case>
 
-   <test-case name="strip-space-0801">
-      <description>Another Test for white-space handling</description>
+   <test-case name="strip-space-014">
+      <description>
+         Was: whitespace-0801
+         Another Test for white-space handling
+      </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment>
          <source role=".">
@@ -309,22 +349,25 @@
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0801.xsl"/>
+         <stylesheet file="strip-space-014.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out>ab</out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="strip-space-0901">
-      <description>Another Test for white-space</description>
+   <test-case name="strip-space-015">
+      <description>
+         Was: whitespace-0901
+         Another Test for white-space
+      </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="strip-space-09"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0901.xsl"/>
+         <stylesheet file="strip-space-015.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out xmlns:ns1="http://ns1/">ab
@@ -334,15 +377,18 @@
       </result>
    </test-case>
 
-   <test-case name="strip-space-0902">
-      <description>Another Test for white-space</description>
+   <test-case name="strip-space-016">
+      <description>
+         Was: whitespace-0902
+         Another Test for white-space
+      </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="strip-space-09"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-0902.xsl"/>
+         <stylesheet file="strip-space-016.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out xmlns:ns1="http://ns1/">ab
@@ -352,8 +398,8 @@
       </result>
    </test-case>
 
-   <test-case name="strip-space-1101">
-      <description/>
+   <test-case name="strip-space-017">
+      <description>Was: whitespace-1101</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment>
          <source role=".">
@@ -366,7 +412,7 @@
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-1101.xsl"/>
+         <stylesheet file="strip-space-017.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out>Position:1,Last:3
@@ -376,9 +422,11 @@
       </result>
    </test-case>
 
-   <test-case name="strip-space-1401">
-      <description>test that the default namespace is NOT used for names in
-         xsl:strip-space</description>
+   <test-case name="strip-space-018">
+      <description>
+         Was: whitespace-1401
+         test that the default namespace is NOT used for names in xsl:strip-space
+      </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment>
          <source role=".">
@@ -389,16 +437,18 @@
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-1401.xsl"/>
+         <stylesheet file="strip-space-018.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<doc xmlns="http://foo.uri/"><a> </a><b> </b><c> </c></doc>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="strip-space-1501">
-      <description>test two conflicting xsl:strip-space/preserve-space declarations (recoverable
-         error)</description>
+   <test-case name="strip-space-019">
+      <description>
+         Was: whitespace-1501
+         test two conflicting xsl:strip-space/preserve-space declarations (recoverable error)
+      </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <modified by="Abel Braaksma" on="2014-02-11" change="XTSE0270 - is not a recoverable error in XSLT30, remove dependency on 3.0."/>
       <modified by="Abel Braaksma" on="2015-04-02" change="Allow XTRE0270 to be thrown, add 3.0 variant of test"/>
@@ -411,7 +461,7 @@
          <spec value="XSLT10 XSLT20"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-1501.xsl"/>
+         <stylesheet file="strip-space-019.xsl"/>
       </test>
       <result>
          <any-of>
@@ -421,8 +471,11 @@
       </result>
    </test-case>
 
-   <test-case name="strip-space-1501a">
-      <description>Two conflicting xsl:strip-space/preserve-space declarations (static error in XSLT 3.0)</description>
+   <test-case name="strip-space-019a">
+      <description>
+         Was: whitespace-1501a
+         Two conflicting xsl:strip-space/preserve-space declarations (static error in XSLT 3.0)
+      </description>
       <created by="Abel Braaksma" on="2015-04-02"/>
       <environment>
          <source role=".">
@@ -433,15 +486,18 @@
          <spec value="XSLT30+" />
       </dependencies>
       <test>
-         <stylesheet file="strip-space-1501.xsl"/>
+         <stylesheet file="strip-space-019.xsl"/>
       </test>
       <result>
          <error code="XTSE0270" />
       </result>
    </test-case>
 
-   <test-case name="strip-space-1601">
-      <description>Test import precedence for xsl:strip-space</description>
+   <test-case name="strip-space-020">
+      <description>
+         Was: whitespace-1601
+         Test import precedence for xsl:strip-space
+      </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment>
          <source role=".">
@@ -458,32 +514,35 @@
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-1601.xsl"/>
-         <stylesheet file="strip-space-1601a.xsl" role="secondary"/>
+         <stylesheet file="strip-space-020.xsl"/>
+         <stylesheet file="strip-space-020a.xsl" role="secondary"/>
       </test>
       <result>
          <assert-xml><![CDATA[<abc:doc xmlns:abc="http://abc.uri/"><abc:w>   </abc:w><abc:x/><abc:y/><abc:z/><q>    </q></abc:doc>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="strip-space-1704">
-      <description>no confict reported in 2.0 if there are two identical strip-space or
-         preserve-space declarations</description>
+   <test-case name="strip-space-021">
+      <description>
+         Was: whitespace-1704
+         no confict reported in 2.0 if there are two identical strip-space or
+         preserve-space declarations
+      </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="strip-space-17"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-1704.xsl"/>
+         <stylesheet file="strip-space-021.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<document><section/><section/><section/></document>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="strip-space-1801">
-      <description/>
+   <test-case name="strip-space-022">
+      <description>Was: whitespace-1801</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
       <environment>
@@ -502,11 +561,11 @@
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="strip-space-1801.xsl"/>
+         <stylesheet file="strip-space-022.xsl"/>
          <output serialize="yes"/>
       </test>
       <result>
-         <assert-serialization method="xml" file="strip-space-1801.out"/>
+         <assert-serialization method="xml" file="strip-space-022.out"/>
       </result>
    </test-case>
 </test-set>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/environment-04.xml	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc xmlns:one="http://www.test1.example.org" 
+	 xmlns:two="http://www.test2.example.org"
+	 xmlns:three="http://www.test3.example.org">
+<one:elem>
+   		<a>elem1</a>
+   		
+</one:elem>
+<one:elem>   <a>elem2</a>   </one:elem>
+<two:elem>
+   <a>elem3</a></two:elem>
+<three:elem><a>elem4</a>			</three:elem>
+<one:elem>
+   	<a>elem5</a>
+</one:elem>
+<two:elem> <a>elem6</a> </two:elem>
+</doc>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/environment-05.xml	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<doc xmlns:one="http://www.test1.example.org" 
+	 xmlns:two="http://www.test2.example.org"
+	 xmlns:three="http://www.test3.example.org">
+<one:el>
+   		<a>el1</a>
+   		
+</one:el>
+<one:elem>   <a>elem2</a>   </one:elem>
+<two:elem>
+   <a>elem3</a></two:elem>
+<three:elem><a>elem4</a>			</three:elem>
+<one:item>
+   	<a>item5</a>
+</one:item>
+<two:elem> <a>elem6</a> </two:elem>
+</doc>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/environment-06.xml	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<my:userNode 
+  xmlns:my="http://www.whitespace.example.com/ns/various"
+	 	  my:specialPart="123-AB">
+		<my:complexUserElem age="75">
+		
+		
+			<firstName>Hello</firstName>
+      		
+      					<familyName>There</familyName>
+      					
+		</my:complexUserElem>
+	
+	<my:complexUserElem age="31">
+		<firstName>    </firstName>
+		<familyName>    </familyName>
+	</my:complexUserElem>
+</my:userNode>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/environment-06.xsd	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+			targetNamespace="http://www.whitespace.example.com/ns/various"
+			xmlns:my="http://www.whitespace.example.com/ns/various">
+
+	<xsd:annotation>
+		<xsd:documentation>
+      		Schema for various types for node tests 
+		</xsd:documentation>
+	</xsd:annotation>
+
+<!-- Begin definitions -->
+	<xsd:element name="userNode" type="my:userType" nillable="true" />
+	
+	<xsd:element name="simpleBuiltin" type="xsd:Name" />
+	<xsd:element name="simpleUserElem" type="my:partNumberType" />
+	<xsd:element name="simpleUserList" type="my:myListType" />
+	<xsd:element name="simpleUserUnion" type="my:partIntegerUnion" />
+	<xsd:element name="complexMixedUserElem" type="my:mixedPersonType" />
+	<xsd:element name="complexUserElem" type="my:personType" />
+	<xsd:element name="complexSimpleContentElem" type="my:complexSimpleContent" />
+	<xsd:element name="onlyAttributes" type="my:onlyAttributesType" />
+	
+	<xsd:attribute name="specialPart" type="my:partNumberType"/>
+	<xsd:attribute name="colors" type="xsd:NMTOKENS"/>
+	<xsd:attribute name="union" type="my:partIntegerUnion"/>
+	<xsd:attribute name="count" type="xsd:string"/>
+
+	
+	<xsd:simpleType name="partNumberType">
+    <xsd:restriction base="xsd:string">
+      <xsd:pattern value="\d{3}-[A-Z]{2}"/>
+    </xsd:restriction>
+  </xsd:simpleType>
+  
+  <xsd:simpleType name="derivedURI">
+    <xsd:restriction base="xsd:anyURI">
+      <xsd:enumeration value="http://test1.org"/>
+      <xsd:enumeration value="http://test2.org"/>
+    </xsd:restriction>
+  </xsd:simpleType>
+  
+  <xsd:complexType name="personType">
+    <xsd:sequence>
+      <xsd:element name="firstName"  type="xsd:string"/>
+      <xsd:element name="familyName">
+        <xsd:complexType>
+          <xsd:simpleContent>
+            <xsd:extension base="xsd:string">
+              <xsd:anyAttribute/>
+            </xsd:extension>
+          </xsd:simpleContent>
+        </xsd:complexType>
+      </xsd:element>  
+    </xsd:sequence>
+    <xsd:attribute name="age" type="xsd:integer"/>
+  </xsd:complexType>
+  
+  <xsd:complexType name="mixedPersonType">
+    <xsd:sequence>
+      <xsd:element name="description" type="my:DescriptionType" />
+      <xsd:element name="company" type="my:CompanyType" />
+    </xsd:sequence>
+    <xsd:attribute name="age" type="xsd:integer"/>
+  </xsd:complexType>
+  
+  <xsd:complexType name="DescriptionType" mixed="true">
+     <xsd:sequence>
+       <xsd:element name="name" type="xsd:string"/>
+     </xsd:sequence>
+  </xsd:complexType>
+        
+  <xsd:complexType name="CompanyType" mixed="true">
+     <xsd:sequence>
+        <xsd:element name="name" type="xsd:string"/>
+     </xsd:sequence>
+  </xsd:complexType>
+  
+  <xsd:simpleType name="myListType">
+  	<xsd:list itemType="xsd:Name"/>
+  </xsd:simpleType>
+  
+  <xsd:simpleType name="restrictionListType">
+  	<xsd:list itemType="xsd:double"/>
+  </xsd:simpleType>
+  
+  <xsd:simpleType name="sixDoubles">
+  <xsd:restriction base="my:restrictionListType">
+     <xsd:minLength value="3"/>
+     <xsd:maxLength value="6"/>
+    
+  </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="partIntegerUnion">
+  	<xsd:union memberTypes="my:partNumberType xsd:integer"/>
+  </xsd:simpleType>
+  
+  <xsd:simpleType name="listUnionType">
+  	<xsd:union memberTypes="my:sixDoubles my:myListType"/>
+  </xsd:simpleType>
+  
+  <xsd:complexType name="complexSimpleContent">
+    <xsd:simpleContent>
+      <xsd:extension base="xsd:decimal">
+        <xsd:attribute ref="my:count"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+  
+  <xsd:complexType name="onlyAttributesType">
+    <xsd:attribute ref="my:colors" />
+    <xsd:attribute name="specialPart" type="my:partNumberType"/>
+    <xsd:attribute ref="my:union" use="optional"/>
+  </xsd:complexType>
+  
+  <xsd:complexType name="userType">
+		<xsd:sequence>
+			<xsd:element ref="my:simpleBuiltin" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="my:simpleUserElem" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="my:simpleUserList" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="my:simpleUserUnion" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="my:complexMixedUserElem" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="my:complexUserElem" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="my:complexSimpleContentElem" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element ref="my:onlyAttributes" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element name="listOfDoubles" type="my:restrictionListType" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element name="listOfSixDoubles" type="my:sixDoubles" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element name="listUnion" type="my:listUnionType" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+			<xsd:attribute ref="my:specialPart" />
+  </xsd:complexType>
+</xsd:schema>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/environment-09.xml	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+<doc xmlns:foo="http://ns1/" xmlns:roo="http://ns2/">
+  <foo:test>
+       <a>a</a>
+       <b>b</b>
+  </foo:test>
+  <roo:test>
+       <c>c</c>
+       <d>d</d>
+  </roo:test>
+</doc>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-001.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:foo="http://www.test1.example.org" xmlns:t="http://www.w3.org/1999/XSL/Transform"
+   exclude-result-prefixes="foo" version="2.0">
+   <!-- Purpose: Test with an element constructed with whitespace text node children. 
+				The element is stored in a variable and its name is listed in xsl:strip-space. 
+				Confirm that the element has a text node child. -->
+
+   <t:variable name="var" as="element()">
+      <foo:elem>
+         <t:value-of select="substring('ab   cd  ef',3,2)"/>
+      </foo:elem>
+   </t:variable>
+
+   <t:strip-space elements="foo:elem"/>
+
+   <t:template match="/doc">
+      <out>
+         <a>
+            <t:value-of select="$var/text()"/>
+         </a>
+         <a>
+            <t:value-of select="count($var/text())"/>
+         </a>
+      </out>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-002.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,11 @@
+<xsl:stylesheet
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  version="2.0">
+
+  <xsl:strip-space elements="xfa:* "/>
+
+  <xsl:template match="doc">
+    <TEST/>
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-003.out	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><out><b>
+   		elem1
+   		
+</b><b>   elem2   </b><b>
+   elem3</b><b>elem4			</b><b>
+   	elem5
+</b><b> elem6 </b></out>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-003.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+   <!-- Purpose: Test xsl:preserve-space with @elements="*:NCName". Template 
+  				rules have  match="*", match="*:NCName" and match="QName" -->
+
+   <t:strip-space elements="*"/>
+
+   <t:preserve-space elements="*:elem"/>
+
+   <t:template match="/doc">
+      <out>
+         <t:apply-templates/>
+      </out>
+   </t:template>
+
+   <t:template match="elem">
+      <a>
+         <t:value-of select="."/>
+      </a>
+   </t:template>
+
+   <t:template match="*:elem">
+      <b>
+         <t:value-of select="."/>
+      </b>
+   </t:template>
+
+   <t:template match="*">
+      <c>
+         <t:value-of select="."/>
+      </c>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-004.out	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+<b>elem1</b>
+<b>elem2</b>
+<b>elem3</b>
+<b>elem4</b>
+<b>elem5</b>
+<b>elem6</b>
+</out>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-004.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Test xsl:strip-space with @elements="*:NCName". 
+				Template rules have  match="*", match="*:NCName" and match="QName". -->
+
+   <t:preserve-space elements="*"/>
+
+   <t:strip-space elements="*:elem"/>
+
+   <t:template match="/doc">
+	     <out>
+         <t:apply-templates/>
+      </out>
+   </t:template>
+
+   <t:template match="elem">
+	     <a>
+         <t:value-of select="."/>
+      </a>
+   </t:template>
+
+   <t:template match="*:elem">
+	     <b>
+         <t:value-of select="."/>
+      </b>
+   </t:template>
+
+   <t:template match="*">
+	     <c>
+         <t:value-of select="."/>
+      </c>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-005.out	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><out><b>
+   		el1
+   		
+</b><b>   elem2   </b><c>elem3</c><c>elem4</c><b>
+   	item5
+</b><c>elem6</c></out>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-005.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:foo="http://www.test1.example.org" xmlns:t="http://www.w3.org/1999/XSL/Transform"
+   exclude-result-prefixes="foo" version="2.0">
+   <!-- Purpose: Test xsl:preserve-space with @elements="NCName:*". 
+  				Template rules have  match="*" , match="NCName:* and match="QName". -->
+
+   <t:strip-space elements="*"/>
+
+   <t:preserve-space elements="foo:*"/>
+
+   <t:template match="/doc">
+      <out>
+         <t:apply-templates/>
+      </out>
+   </t:template>
+
+   <t:template match="elem">
+      <a>
+         <t:value-of select="."/>
+      </a>
+   </t:template>
+
+   <t:template match="foo:*">
+      <b>
+         <t:value-of select="."/>
+      </b>
+   </t:template>
+
+   <t:template match="*">
+      <c>
+         <t:value-of select="."/>
+      </c>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-006.out	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><out>
+<b>el1</b>
+<b>elem2</b>
+<c>
+   elem3</c>
+<c>elem4			</c>
+<b>item5</b>
+<c> elem6 </c>
+</out>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-006.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:foo="http://www.test1.example.org" xmlns:t="http://www.w3.org/1999/XSL/Transform"
+   exclude-result-prefixes="foo" version="2.0">
+   <!-- Purpose: Test xsl:strip-space with @elements="NCName:*". Template 
+  				rules have  match="*" , match="NCName:* and match="QName". -->
+
+   <t:preserve-space elements="*"/>
+
+   <t:strip-space elements="foo:*"/>
+
+   <t:template match="/doc">
+      <out>
+         <t:apply-templates/>
+      </out>
+   </t:template>
+
+   <t:template match="elem">
+      <a>
+         <t:value-of select="."/>
+      </a>
+   </t:template>
+
+   <t:template match="foo:*">
+      <b>
+         <t:value-of select="."/>
+      </b>
+   </t:template>
+
+   <t:template match="*">
+      <c>
+         <t:value-of select="."/>
+      </c>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-007.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:my="http://www.whitespace.example.com/ns/various"
+             xmlns:t="http://www.w3.org/1999/XSL/Transform"
+             exclude-result-prefixes="my"
+             version="2.0">
+<!-- Purpose: Test that whitespace text nodes are stripped from elements with element 
+  				only content regardless of xsl:preserve-space or xsl:strip-space. -->
+
+   <t:preserve-space elements="my:complexUserElem"/>
+
+   <t:template match="/my:userNode">
+      <t:variable name="copy">
+	        <out>
+	           <t:copy-of select="my:complexUserElem[1]"/>
+         </out>
+	     </t:variable>
+	     <t:choose>
+	        <t:when test="exists($copy//text()[matches(.,'\s+')])">
+	           <t:copy-of select="$copy"/>
+	        </t:when>
+	        <t:otherwise>
+	           <ok/>
+	        </t:otherwise>
+	     </t:choose>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-008.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:my="http://www.whitespace.example.com/ns/various"
+   xmlns:t="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="my" version="2.0">
+   <!-- Purpose: Test that whitespace text nodes are not stripped from elements with simple 
+content regardless of xsl:preserve-space or xsl:strip-space. -->
+
+   <!-- We use several different tests to check the whitespace is still there,
+   in order to exercise different paths in Saxon -->
+   
+   <!-- firstName has a simple type; familyName has a complex type with simple content -->
+
+   <t:strip-space elements="firstName familyName"/>
+   <!-- note, the child elements are not namespace-qualified -->
+
+   <t:template match="/my:userNode">
+      <t:variable name="copy">
+         <out>
+            <t:copy-of select="my:complexUserElem[2]"/>
+         </out>
+      </t:variable>
+      <t:choose>
+         <t:when test="empty($copy//firstName/text()[matches(.,'\s+')])">
+            <a><t:copy-of select="$copy"/></a>
+         </t:when>
+         <t:when test="empty($copy//familyName/text()[matches(.,'\s+')])">
+            <b><t:copy-of select="$copy"/></b>
+         </t:when>
+         <t:when test="empty(my:complexUserElem[2]//firstName/text()[matches(.,'\s+')])">
+            <c><t:copy-of select="$copy"/></c>
+         </t:when>
+         <t:when test="string(my:complexUserElem[2]//firstName) = ''">
+            <d><t:copy-of select="$copy"/></d>
+         </t:when>
+         <t:when test="not(data(my:complexUserElem[2]//firstName))">
+            <e><t:copy-of select="$copy"/></e>
+         </t:when>
+         <t:when test="empty(my:complexUserElem[2]//familyName/text()[matches(.,'\s+')])">
+            <f><t:copy-of select="$copy"/></f>
+         </t:when>
+         <t:when test="string(my:complexUserElem[2]//familyName) = ''">
+            <g><t:copy-of select="$copy"/></g>
+         </t:when>
+         <t:when test="not(data(my:complexUserElem[2]//familyName))">
+            <h><t:copy-of select="$copy"/></h>
+         </t:when>
+         <t:otherwise>
+            <ok/>
+         </t:otherwise>
+      </t:choose>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-009.xml	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<doc xsi:type="t" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <a>
+    <b>
+      <c>
+        <p>    </p>
+      </c>
+    </b>
+  </a>
+</doc>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-009.xsd	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,8 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+  <xs:complexType name="t" mixed="true">
+    <xs:sequence>
+      <xs:any processContents="skip"/>
+    </xs:sequence>
+    <xs:assert test="exists(.//p[string-length(.) = 4])"/>
+  </xs:complexType>
+</xs:schema>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-009.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:my="http://www.whitespace.example.com/ns/various"
+   xmlns:t="http://www.w3.org/1999/XSL/Transform" 
+   exclude-result-prefixes="my" version="2.0">
+   <!-- Purpose: Test that whitespace text nodes are not stripped from an element
+        if there is an ancestor element that was validated against a type that includes
+        an assertion. -->
+
+   <!-- We use several different tests to check the whitespace is still there,
+   in order to exercise different paths in Saxon -->
+   
+   <!-- firstName has a simple type; familyName has a complex type with simple content -->
+
+   <t:strip-space elements="p"/>
+   
+
+
+   <t:template match="/">
+      <t:variable name="copy">
+         <out>
+            <t:copy-of select="doc"/>
+         </out>
+      </t:variable>
+      <t:choose>
+         <t:when test="empty($copy//p/text()[matches(.,'\s{4}')])">
+            <a><t:copy-of select="$copy"/></a>
+         </t:when>
+         <t:when test="empty(doc//p/text()[matches(.,'\s+')])">
+            <c><t:copy-of select="$copy"/></c>
+         </t:when>
+         <t:when test="string(doc//p) = ''">
+            <d><t:copy-of select="$copy"/></d>
+         </t:when>
+         <t:when test="not(data(doc//p))">
+            <e><t:copy-of select="$copy"/></e>
+         </t:when>
+         <t:otherwise>
+            <ok/>
+         </t:otherwise>
+      </t:choose>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-010.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+
+<!-- Another Test for white-space -->
+ 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+  <xsl:strip-space elements="test1"/>
+  
+  <xsl:template match="doc">
+    <out>
+	    <xsl:apply-templates select="*"/>
+    </out>
+  </xsl:template>
+   
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-011.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+
+<!-- Another Test for white-space -->
+ 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+  <xsl:strip-space elements="test1 test2"/>
+  
+  <xsl:template match="doc">
+    <out>
+	    <xsl:apply-templates select="*"/>
+    </out>
+  </xsl:template>
+   
+</xsl:stylesheet>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-0114.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:foo="http://www.test1.example.org" xmlns:t="http://www.w3.org/1999/XSL/Transform"
-   exclude-result-prefixes="foo" version="2.0">
-   <!-- Purpose: Test with an element constructed with whitespace text node children. 
-				The element is stored in a variable and its name is listed in xsl:strip-space. 
-				Confirm that the element has a text node child. -->
-
-   <t:variable name="var" as="element()">
-      <foo:elem>
-         <t:value-of select="substring('ab   cd  ef',3,2)"/>
-      </foo:elem>
-   </t:variable>
-
-   <t:strip-space elements="foo:elem"/>
-
-   <t:template match="/doc">
-      <out>
-         <a>
-            <t:value-of select="$var/text()"/>
-         </a>
-         <a>
-            <t:value-of select="count($var/text())"/>
-         </a>
-      </out>
-   </t:template>
-</t:transform>
--- a/tests/decl/strip-space/strip-space-0115.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<xsl:stylesheet
-  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
-  version="2.0">
-
-  <xsl:strip-space elements="xfa:* "/>
-
-  <xsl:template match="doc">
-    <TEST/>
-  </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-012.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+
+<!-- Another Test for white-space -->
+ 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+  <xsl:strip-space elements="*"/>
+  
+  <xsl:template match="doc">
+    <out>
+	    <xsl:apply-templates select="*"/>
+    </out>
+  </xsl:template>
+   
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-013.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+
+<!-- Another Test for white-space -->
+ 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+  <xsl:strip-space elements="*"/>
+  <xsl:preserve-space elements="test2"/>
+  
+  <xsl:template match="doc">
+    <out>
+	    <xsl:apply-templates select="*"/>
+    </out>
+  </xsl:template>
+   
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-014.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+
+<!-- PURPOSE: Another Test for white-space handling-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+  <xsl:strip-space elements="b"/>
+  
+  <xsl:template match="doc">
+    <out>
+	    <xsl:apply-templates select="*"/>
+    </out>
+  </xsl:template>
+   
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-015.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+
+<!-- Another Test for white-space -->
+ 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:ns1="http://ns1/">
+  <xsl:strip-space elements="ns1:test"/>
+  
+  <xsl:template match="doc">
+    <out>
+	    <xsl:apply-templates select="*"/>
+    </out>
+  </xsl:template>
+   
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-016.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+
+<!-- Another Test for white-space -->
+  
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:ns1="http://ns1/">
+  <xsl:strip-space elements="ns1:*"/>
+  
+  <xsl:template match="doc">
+    <out>
+	    <xsl:apply-templates select="*"/>
+    </out>
+  </xsl:template>
+   
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-017.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,20 @@
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+  
+  <xsl:strip-space elements="document"/>
+  <?spec xslt#strip?>
+
+  <xsl:template match="document">
+    <out>
+      <xsl:apply-templates/>
+    </out>
+  </xsl:template>
+
+  <xsl:template match="section">
+    <xsl:text>Position:</xsl:text><xsl:value-of select="position()"/>
+    <xsl:text>,Last:</xsl:text><xsl:value-of select="last()"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-018.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+
+<!-- test that the default namespace is NOT used for names in xsl:strip-space -->
+<?spec xslt#strip?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+  <xsl:strip-space elements="a b c" xmlns="http://foo.uri/"/>
+  <xsl:template match="/"><xsl:copy-of select="."/></xsl:template>
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-019.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+
+<!-- test two conflicting xsl:strip-space declarations (recoverable error) --> 
+<?spec xslt#strip?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+  <xsl:strip-space elements="a b c"/>
+  <xsl:preserve-space elements="b"/>
+  <xsl:template match="/"><xsl:copy-of select="."/></xsl:template>
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-020.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,13 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
+xmlns:abc="http://abc.uri/">
+
+<!-- Test import precedence for xsl:strip-space -->
+
+<xsl:import href="strip-space-020a.xsl"/>
+<xsl:strip-space elements="abc:*"/>
+<xsl:preserve-space elements="abc:w"/>
+
+<xsl:template match="/"><xsl:copy-of select="."/></xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-020a.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,9 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
+xmlns:abc="http://abc.uri/">
+
+<xsl:preserve-space elements="abc:x abc:y abc:z q"/>
+
+  <xsl:template match="/"><xsl:copy-of select="."/></xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-021.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,18 @@
+<xsl:stylesheet version="2.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  
+  <!-- no confict reported in 2.0 if there are two 
+       identical strip-space or preserve-space declarations -->
+        <?spec xslt#strip?>
+
+  <xsl:output method="xml" indent="no" />
+
+  <xsl:strip-space elements="document"/>
+  <xsl:strip-space elements="document"/>
+
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-022.out	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><a xml:space="preserve">
+  <b xml:space="default"/>
+  <c>  </c>
+  <d xml:space="preserve">  </d>
+  <e xml:space="default"><f xml:space="preserve">  </f></e>
+</a>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/strip-space/strip-space-022.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,15 @@
+<xsl:stylesheet version="2.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  
+  <?spec xslt#strip?>
+
+  <xsl:output method="xml" indent="no" />
+
+  <xsl:strip-space elements="*"/>
+
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+</xsl:stylesheet>
--- a/tests/decl/strip-space/strip-space-04.xml	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-<doc xmlns:one="http://www.test1.example.org" 
-	 xmlns:two="http://www.test2.example.org"
-	 xmlns:three="http://www.test3.example.org">
-<one:elem>
-   		<a>elem1</a>
-   		
-</one:elem>
-<one:elem>   <a>elem2</a>   </one:elem>
-<two:elem>
-   <a>elem3</a></two:elem>
-<three:elem><a>elem4</a>			</three:elem>
-<one:elem>
-   	<a>elem5</a>
-</one:elem>
-<two:elem> <a>elem6</a> </two:elem>
-</doc>
--- a/tests/decl/strip-space/strip-space-0401.out	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><out><b>
-   		elem1
-   		
-</b><b>   elem2   </b><b>
-   elem3</b><b>elem4			</b><b>
-   	elem5
-</b><b> elem6 </b></out>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-0401.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-   <!-- Purpose: Test xsl:preserve-space with @elements="*:NCName". Template 
-  				rules have  match="*", match="*:NCName" and match="QName" -->
-
-   <t:strip-space elements="*"/>
-
-   <t:preserve-space elements="*:elem"/>
-
-   <t:template match="/doc">
-      <out>
-         <t:apply-templates/>
-      </out>
-   </t:template>
-
-   <t:template match="elem">
-      <a>
-         <t:value-of select="."/>
-      </a>
-   </t:template>
-
-   <t:template match="*:elem">
-      <b>
-         <t:value-of select="."/>
-      </b>
-   </t:template>
-
-   <t:template match="*">
-      <c>
-         <t:value-of select="."/>
-      </c>
-   </t:template>
-</t:transform>
--- a/tests/decl/strip-space/strip-space-0402.out	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><out>
-<b>elem1</b>
-<b>elem2</b>
-<b>elem3</b>
-<b>elem4</b>
-<b>elem5</b>
-<b>elem6</b>
-</out>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-0402.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test xsl:strip-space with @elements="*:NCName". 
-				Template rules have  match="*", match="*:NCName" and match="QName". -->
-
-   <t:preserve-space elements="*"/>
-
-   <t:strip-space elements="*:elem"/>
-
-   <t:template match="/doc">
-	     <out>
-         <t:apply-templates/>
-      </out>
-   </t:template>
-
-   <t:template match="elem">
-	     <a>
-         <t:value-of select="."/>
-      </a>
-   </t:template>
-
-   <t:template match="*:elem">
-	     <b>
-         <t:value-of select="."/>
-      </b>
-   </t:template>
-
-   <t:template match="*">
-	     <c>
-         <t:value-of select="."/>
-      </c>
-   </t:template>
-</t:transform>
--- a/tests/decl/strip-space/strip-space-05.xml	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-<doc xmlns:one="http://www.test1.example.org" 
-	 xmlns:two="http://www.test2.example.org"
-	 xmlns:three="http://www.test3.example.org">
-<one:el>
-   		<a>el1</a>
-   		
-</one:el>
-<one:elem>   <a>elem2</a>   </one:elem>
-<two:elem>
-   <a>elem3</a></two:elem>
-<three:elem><a>elem4</a>			</three:elem>
-<one:item>
-   	<a>item5</a>
-</one:item>
-<two:elem> <a>elem6</a> </two:elem>
-</doc>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-0501.out	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><out><b>
-   		el1
-   		
-</b><b>   elem2   </b><c>elem3</c><c>elem4</c><b>
-   	item5
-</b><c>elem6</c></out>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-0501.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:foo="http://www.test1.example.org" xmlns:t="http://www.w3.org/1999/XSL/Transform"
-   exclude-result-prefixes="foo" version="2.0">
-   <!-- Purpose: Test xsl:preserve-space with @elements="NCName:*". 
-  				Template rules have  match="*" , match="NCName:* and match="QName". -->
-
-   <t:strip-space elements="*"/>
-
-   <t:preserve-space elements="foo:*"/>
-
-   <t:template match="/doc">
-      <out>
-         <t:apply-templates/>
-      </out>
-   </t:template>
-
-   <t:template match="elem">
-      <a>
-         <t:value-of select="."/>
-      </a>
-   </t:template>
-
-   <t:template match="foo:*">
-      <b>
-         <t:value-of select="."/>
-      </b>
-   </t:template>
-
-   <t:template match="*">
-      <c>
-         <t:value-of select="."/>
-      </c>
-   </t:template>
-</t:transform>
--- a/tests/decl/strip-space/strip-space-0502.out	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><out>
-<b>el1</b>
-<b>elem2</b>
-<c>
-   elem3</c>
-<c>elem4			</c>
-<b>item5</b>
-<c> elem6 </c>
-</out>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-0502.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:foo="http://www.test1.example.org" xmlns:t="http://www.w3.org/1999/XSL/Transform"
-   exclude-result-prefixes="foo" version="2.0">
-   <!-- Purpose: Test xsl:strip-space with @elements="NCName:*". Template 
-  				rules have  match="*" , match="NCName:* and match="QName". -->
-
-   <t:preserve-space elements="*"/>
-
-   <t:strip-space elements="foo:*"/>
-
-   <t:template match="/doc">
-      <out>
-         <t:apply-templates/>
-      </out>
-   </t:template>
-
-   <t:template match="elem">
-      <a>
-         <t:value-of select="."/>
-      </a>
-   </t:template>
-
-   <t:template match="foo:*">
-      <b>
-         <t:value-of select="."/>
-      </b>
-   </t:template>
-
-   <t:template match="*">
-      <c>
-         <t:value-of select="."/>
-      </c>
-   </t:template>
-</t:transform>
--- a/tests/decl/strip-space/strip-space-06.xml	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<my:userNode 
-  xmlns:my="http://www.whitespace.example.com/ns/various"
-	 	  my:specialPart="123-AB">
-		<my:complexUserElem age="75">
-		
-		
-			<firstName>Hello</firstName>
-      		
-      					<familyName>There</familyName>
-      					
-		</my:complexUserElem>
-	
-	<my:complexUserElem age="31">
-		<firstName>    </firstName>
-		<familyName>    </familyName>
-	</my:complexUserElem>
-</my:userNode>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-06.xsd	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-			targetNamespace="http://www.whitespace.example.com/ns/various"
-			xmlns:my="http://www.whitespace.example.com/ns/various">
-
-	<xsd:annotation>
-		<xsd:documentation>
-      		Schema for various types for node tests 
-		</xsd:documentation>
-	</xsd:annotation>
-
-<!-- Begin definitions -->
-	<xsd:element name="userNode" type="my:userType" nillable="true" />
-	
-	<xsd:element name="simpleBuiltin" type="xsd:Name" />
-	<xsd:element name="simpleUserElem" type="my:partNumberType" />
-	<xsd:element name="simpleUserList" type="my:myListType" />
-	<xsd:element name="simpleUserUnion" type="my:partIntegerUnion" />
-	<xsd:element name="complexMixedUserElem" type="my:mixedPersonType" />
-	<xsd:element name="complexUserElem" type="my:personType" />
-	<xsd:element name="complexSimpleContentElem" type="my:complexSimpleContent" />
-	<xsd:element name="onlyAttributes" type="my:onlyAttributesType" />
-	
-	<xsd:attribute name="specialPart" type="my:partNumberType"/>
-	<xsd:attribute name="colors" type="xsd:NMTOKENS"/>
-	<xsd:attribute name="union" type="my:partIntegerUnion"/>
-	<xsd:attribute name="count" type="xsd:string"/>
-
-	
-	<xsd:simpleType name="partNumberType">
-    <xsd:restriction base="xsd:string">
-      <xsd:pattern value="\d{3}-[A-Z]{2}"/>
-    </xsd:restriction>
-  </xsd:simpleType>
-  
-  <xsd:simpleType name="derivedURI">
-    <xsd:restriction base="xsd:anyURI">
-      <xsd:enumeration value="http://test1.org"/>
-      <xsd:enumeration value="http://test2.org"/>
-    </xsd:restriction>
-  </xsd:simpleType>
-  
-  <xsd:complexType name="personType">
-    <xsd:sequence>
-      <xsd:element name="firstName"  type="xsd:string"/>
-      <xsd:element name="familyName">
-        <xsd:complexType>
-          <xsd:simpleContent>
-            <xsd:extension base="xsd:string">
-              <xsd:anyAttribute/>
-            </xsd:extension>
-          </xsd:simpleContent>
-        </xsd:complexType>
-      </xsd:element>  
-    </xsd:sequence>
-    <xsd:attribute name="age" type="xsd:integer"/>
-  </xsd:complexType>
-  
-  <xsd:complexType name="mixedPersonType">
-    <xsd:sequence>
-      <xsd:element name="description" type="my:DescriptionType" />
-      <xsd:element name="company" type="my:CompanyType" />
-    </xsd:sequence>
-    <xsd:attribute name="age" type="xsd:integer"/>
-  </xsd:complexType>
-  
-  <xsd:complexType name="DescriptionType" mixed="true">
-     <xsd:sequence>
-       <xsd:element name="name" type="xsd:string"/>
-     </xsd:sequence>
-  </xsd:complexType>
-        
-  <xsd:complexType name="CompanyType" mixed="true">
-     <xsd:sequence>
-        <xsd:element name="name" type="xsd:string"/>
-     </xsd:sequence>
-  </xsd:complexType>
-  
-  <xsd:simpleType name="myListType">
-  	<xsd:list itemType="xsd:Name"/>
-  </xsd:simpleType>
-  
-  <xsd:simpleType name="restrictionListType">
-  	<xsd:list itemType="xsd:double"/>
-  </xsd:simpleType>
-  
-  <xsd:simpleType name="sixDoubles">
-  <xsd:restriction base="my:restrictionListType">
-     <xsd:minLength value="3"/>
-     <xsd:maxLength value="6"/>
-    
-  </xsd:restriction>
-  </xsd:simpleType>
-
-  <xsd:simpleType name="partIntegerUnion">
-  	<xsd:union memberTypes="my:partNumberType xsd:integer"/>
-  </xsd:simpleType>
-  
-  <xsd:simpleType name="listUnionType">
-  	<xsd:union memberTypes="my:sixDoubles my:myListType"/>
-  </xsd:simpleType>
-  
-  <xsd:complexType name="complexSimpleContent">
-    <xsd:simpleContent>
-      <xsd:extension base="xsd:decimal">
-        <xsd:attribute ref="my:count"/>
-      </xsd:extension>
-    </xsd:simpleContent>
-  </xsd:complexType>
-  
-  <xsd:complexType name="onlyAttributesType">
-    <xsd:attribute ref="my:colors" />
-    <xsd:attribute name="specialPart" type="my:partNumberType"/>
-    <xsd:attribute ref="my:union" use="optional"/>
-  </xsd:complexType>
-  
-  <xsd:complexType name="userType">
-		<xsd:sequence>
-			<xsd:element ref="my:simpleBuiltin" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element ref="my:simpleUserElem" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element ref="my:simpleUserList" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element ref="my:simpleUserUnion" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element ref="my:complexMixedUserElem" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element ref="my:complexUserElem" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element ref="my:complexSimpleContentElem" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element ref="my:onlyAttributes" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element name="listOfDoubles" type="my:restrictionListType" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element name="listOfSixDoubles" type="my:sixDoubles" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element name="listUnion" type="my:listUnionType" minOccurs="0" maxOccurs="unbounded"/>
-		</xsd:sequence>
-			<xsd:attribute ref="my:specialPart" />
-  </xsd:complexType>
-</xsd:schema>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-0601.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:my="http://www.whitespace.example.com/ns/various"
-             xmlns:t="http://www.w3.org/1999/XSL/Transform"
-             exclude-result-prefixes="my"
-             version="2.0">
-<!-- Purpose: Test that whitespace text nodes are stripped from elements with element 
-  				only content regardless of xsl:preserve-space or xsl:strip-space. -->
-
-   <t:preserve-space elements="my:complexUserElem"/>
-
-   <t:template match="/my:userNode">
-      <t:variable name="copy">
-	        <out>
-	           <t:copy-of select="my:complexUserElem[1]"/>
-         </out>
-	     </t:variable>
-	     <t:choose>
-	        <t:when test="exists($copy//text()[matches(.,'\s+')])">
-	           <t:copy-of select="$copy"/>
-	        </t:when>
-	        <t:otherwise>
-	           <ok/>
-	        </t:otherwise>
-	     </t:choose>
-   </t:template>
-</t:transform>
--- a/tests/decl/strip-space/strip-space-0602.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:my="http://www.whitespace.example.com/ns/various"
-   xmlns:t="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="my" version="2.0">
-   <!-- Purpose: Test that whitespace text nodes are not stripped from elements with simple 
-content regardless of xsl:preserve-space or xsl:strip-space. -->
-
-   <!-- We use several different tests to check the whitespace is still there,
-   in order to exercise different paths in Saxon -->
-   
-   <!-- firstName has a simple type; familyName has a complex type with simple content -->
-
-   <t:strip-space elements="firstName familyName"/>
-   <!-- note, the child elements are not namespace-qualified -->
-
-   <t:template match="/my:userNode">
-      <t:variable name="copy">
-         <out>
-            <t:copy-of select="my:complexUserElem[2]"/>
-         </out>
-      </t:variable>
-      <t:choose>
-         <t:when test="empty($copy//firstName/text()[matches(.,'\s+')])">
-            <a><t:copy-of select="$copy"/></a>
-         </t:when>
-         <t:when test="empty($copy//familyName/text()[matches(.,'\s+')])">
-            <b><t:copy-of select="$copy"/></b>
-         </t:when>
-         <t:when test="empty(my:complexUserElem[2]//firstName/text()[matches(.,'\s+')])">
-            <c><t:copy-of select="$copy"/></c>
-         </t:when>
-         <t:when test="string(my:complexUserElem[2]//firstName) = ''">
-            <d><t:copy-of select="$copy"/></d>
-         </t:when>
-         <t:when test="not(data(my:complexUserElem[2]//firstName))">
-            <e><t:copy-of select="$copy"/></e>
-         </t:when>
-         <t:when test="empty(my:complexUserElem[2]//familyName/text()[matches(.,'\s+')])">
-            <f><t:copy-of select="$copy"/></f>
-         </t:when>
-         <t:when test="string(my:complexUserElem[2]//familyName) = ''">
-            <g><t:copy-of select="$copy"/></g>
-         </t:when>
-         <t:when test="not(data(my:complexUserElem[2]//familyName))">
-            <h><t:copy-of select="$copy"/></h>
-         </t:when>
-         <t:otherwise>
-            <ok/>
-         </t:otherwise>
-      </t:choose>
-   </t:template>
-</t:transform>
--- a/tests/decl/strip-space/strip-space-0603.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:my="http://www.whitespace.example.com/ns/various"
-   xmlns:t="http://www.w3.org/1999/XSL/Transform" 
-   exclude-result-prefixes="my" version="2.0">
-   <!-- Purpose: Test that whitespace text nodes are not stripped from an element
-        if there is an ancestor element that was validated against a type that includes
-        an assertion. -->
-
-   <!-- We use several different tests to check the whitespace is still there,
-   in order to exercise different paths in Saxon -->
-   
-   <!-- firstName has a simple type; familyName has a complex type with simple content -->
-
-   <t:strip-space elements="p"/>
-   
-
-
-   <t:template match="/">
-      <t:variable name="copy">
-         <out>
-            <t:copy-of select="doc"/>
-         </out>
-      </t:variable>
-      <t:choose>
-         <t:when test="empty($copy//p/text()[matches(.,'\s{4}')])">
-            <a><t:copy-of select="$copy"/></a>
-         </t:when>
-         <t:when test="empty(doc//p/text()[matches(.,'\s+')])">
-            <c><t:copy-of select="$copy"/></c>
-         </t:when>
-         <t:when test="string(doc//p) = ''">
-            <d><t:copy-of select="$copy"/></d>
-         </t:when>
-         <t:when test="not(data(doc//p))">
-            <e><t:copy-of select="$copy"/></e>
-         </t:when>
-         <t:otherwise>
-            <ok/>
-         </t:otherwise>
-      </t:choose>
-   </t:template>
-</t:transform>
--- a/tests/decl/strip-space/strip-space-06a.xml	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<doc xsi:type="t" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <a>
-    <b>
-      <c>
-        <p>    </p>
-      </c>
-    </b>
-  </a>
-</doc>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-06a.xsd	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-  <xs:complexType name="t" mixed="true">
-    <xs:sequence>
-      <xs:any processContents="skip"/>
-    </xs:sequence>
-    <xs:assert test="exists(.//p[string-length(.) = 4])"/>
-  </xs:complexType>
-</xs:schema>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-0701.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0"?> 
-
-<!-- Another Test for white-space -->
- 
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-  <xsl:strip-space elements="test1"/>
-  
-  <xsl:template match="doc">
-    <out>
-	    <xsl:apply-templates select="*"/>
-    </out>
-  </xsl:template>
-   
-</xsl:stylesheet>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-0702.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0"?> 
-
-<!-- Another Test for white-space -->
- 
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-  <xsl:strip-space elements="test1 test2"/>
-  
-  <xsl:template match="doc">
-    <out>
-	    <xsl:apply-templates select="*"/>
-    </out>
-  </xsl:template>
-   
-</xsl:stylesheet>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-0703.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0"?> 
-
-<!-- Another Test for white-space -->
- 
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-  <xsl:strip-space elements="*"/>
-  
-  <xsl:template match="doc">
-    <out>
-	    <xsl:apply-templates select="*"/>
-    </out>
-  </xsl:template>
-   
-</xsl:stylesheet>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-0704.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-<?xml version="1.0"?> 
-
-<!-- Another Test for white-space -->
- 
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-  <xsl:strip-space elements="*"/>
-  <xsl:preserve-space elements="test2"/>
-  
-  <xsl:template match="doc">
-    <out>
-	    <xsl:apply-templates select="*"/>
-    </out>
-  </xsl:template>
-   
-</xsl:stylesheet>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-0801.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0"?> 
-
-<!-- PURPOSE: Another Test for white-space handling-->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-  <xsl:strip-space elements="b"/>
-  
-  <xsl:template match="doc">
-    <out>
-	    <xsl:apply-templates select="*"/>
-    </out>
-  </xsl:template>
-   
-</xsl:stylesheet>
--- a/tests/decl/strip-space/strip-space-09.xml	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?> 
-<doc xmlns:foo="http://ns1/" xmlns:roo="http://ns2/">
-  <foo:test>
-       <a>a</a>
-       <b>b</b>
-  </foo:test>
-  <roo:test>
-       <c>c</c>
-       <d>d</d>
-  </roo:test>
-</doc>
--- a/tests/decl/strip-space/strip-space-0901.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0"?> 
-
-<!-- Another Test for white-space -->
- 
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:ns1="http://ns1/">
-  <xsl:strip-space elements="ns1:test"/>
-  
-  <xsl:template match="doc">
-    <out>
-	    <xsl:apply-templates select="*"/>
-    </out>
-  </xsl:template>
-   
-</xsl:stylesheet>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-0902.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0"?> 
-
-<!-- Another Test for white-space -->
-  
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:ns1="http://ns1/">
-  <xsl:strip-space elements="ns1:*"/>
-  
-  <xsl:template match="doc">
-    <out>
-	    <xsl:apply-templates select="*"/>
-    </out>
-  </xsl:template>
-   
-</xsl:stylesheet>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-1101.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-<xsl:stylesheet
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-  
-  <xsl:strip-space elements="document"/>
-  <?spec xslt#strip?>
-
-  <xsl:template match="document">
-    <out>
-      <xsl:apply-templates/>
-    </out>
-  </xsl:template>
-
-  <xsl:template match="section">
-    <xsl:text>Position:</xsl:text><xsl:value-of select="position()"/>
-    <xsl:text>,Last:</xsl:text><xsl:value-of select="last()"/><xsl:text>
-</xsl:text>
-</xsl:template>
-
-</xsl:stylesheet>
-
--- a/tests/decl/strip-space/strip-space-1401.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- test that the default namespace is NOT used for names in xsl:strip-space -->
-<?spec xslt#strip?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-  <xsl:strip-space elements="a b c" xmlns="http://foo.uri/"/>
-  <xsl:template match="/"><xsl:copy-of select="."/></xsl:template>
-</xsl:stylesheet>
--- a/tests/decl/strip-space/strip-space-1501.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- test two conflicting xsl:strip-space declarations (recoverable error) --> 
-<?spec xslt#strip?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-  <xsl:strip-space elements="a b c"/>
-  <xsl:preserve-space elements="b"/>
-  <xsl:template match="/"><xsl:copy-of select="."/></xsl:template>
-</xsl:stylesheet>
--- a/tests/decl/strip-space/strip-space-1601.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
-xmlns:abc="http://abc.uri/">
-
-<!-- Test import precedence for xsl:strip-space -->
-
-<xsl:import href="strip-space-1601a.xsl"/>
-<xsl:strip-space elements="abc:*"/>
-<xsl:preserve-space elements="abc:w"/>
-
-<xsl:template match="/"><xsl:copy-of select="."/></xsl:template>
-
-</xsl:stylesheet>
--- a/tests/decl/strip-space/strip-space-1601a.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
-xmlns:abc="http://abc.uri/">
-
-<xsl:preserve-space elements="abc:x abc:y abc:z q"/>
-
-  <xsl:template match="/"><xsl:copy-of select="."/></xsl:template>
-
-</xsl:stylesheet>
--- a/tests/decl/strip-space/strip-space-1704.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<xsl:stylesheet version="2.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  
-  <!-- no confict reported in 2.0 if there are two 
-       identical strip-space or preserve-space declarations -->
-        <?spec xslt#strip?>
-
-  <xsl:output method="xml" indent="no" />
-
-  <xsl:strip-space elements="document"/>
-  <xsl:strip-space elements="document"/>
-
-  <xsl:template match="@*|node()">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()"/>
-    </xsl:copy>
-  </xsl:template>
-</xsl:stylesheet>
--- a/tests/decl/strip-space/strip-space-1801.out	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><a xml:space="preserve">
-  <b xml:space="default"/>
-  <c>  </c>
-  <d xml:space="preserve">  </d>
-  <e xml:space="default"><f xml:space="preserve">  </f></e>
-</a>
\ No newline at end of file
--- a/tests/decl/strip-space/strip-space-1801.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-<xsl:stylesheet version="2.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  
-  <?spec xslt#strip?>
-
-  <xsl:output method="xml" indent="no" />
-
-  <xsl:strip-space elements="*"/>
-
-  <xsl:template match="@*|node()">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()"/>
-    </xsl:copy>
-  </xsl:template>
-</xsl:stylesheet>
--- a/tests/misc/whitespace/_whitespace-test-set.xml	Fri Apr 03 03:20:42 2015 +0200
+++ b/tests/misc/whitespace/_whitespace-test-set.xml	Fri Apr 03 04:16:02 2015 +0200
@@ -53,32 +53,38 @@
    </environment>
 
 
-   <test-case name="whitespace-0101">
-      <description> Test that whitespace text nodes as children of xsl:analyze-string which has
-         @xml:space=preserve do not interfere with processing of the instruction. </description>
+   <test-case name="whitespace-001">
+      <description>
+         Was: whitespace-0101
+         Test that whitespace text nodes as children of xsl:analyze-string which has
+         @xml:space=preserve do not interfere with processing of the instruction.
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="whitespace-01"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-0101.xsl"/>
+         <stylesheet file="whitespace-001.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out><E1>a*cada*</E1></out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-0102">
-      <description> Test that whitespace text nodes as children of xsl:apply-imports which has
-         @xml:space=preserve do not interfere with processing of the instruction. </description>
+   <test-case name="whitespace-002">
+      <description>
+         Was: whitespace-0102
+         Test that whitespace text nodes as children of xsl:apply-imports which has
+         @xml:space=preserve do not interfere with processing of the instruction.
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="whitespace-01"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-0102.xsl"/>
+         <stylesheet file="whitespace-002.xsl"/>
          <stylesheet file="import1.xsl" role="secondary"/>
       </test>
       <result>
@@ -86,9 +92,12 @@
       </result>
    </test-case>
 
-   <test-case name="whitespace-0103">
-      <description> Test that whitespace text nodes as children of xsl:character-map which has
-         @xml:space=preserve do not interfere with processing of the instruction. </description>
+   <test-case name="whitespace-003">
+      <description>
+         Was: whitespace-0103
+         Test that whitespace text nodes as children of xsl:character-map which has
+         @xml:space=preserve do not interfere with processing of the instruction.
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
       <environment ref="whitespace-01"/>
@@ -96,7 +105,7 @@
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-0103.xsl"/>
+         <stylesheet file="whitespace-003.xsl"/>
          <output serialize="yes"/>
       </test>
       <result>
@@ -104,121 +113,145 @@
       </result>
    </test-case>
 
-   <test-case name="whitespace-0104">
-      <description> Test that whitespace text nodes as children of xsl:next-match which has
-         @xml:space=preserve do not interfere with processing of the instruction. </description>
-      <created by="Michael Kay" on="2012-10-30"/>
-      <environment ref="whitespace-01"/>
-      <dependencies>
-         <spec value="XSLT10+"/>
-      </dependencies>
-      <test>
-         <stylesheet file="whitespace-0104.xsl"/>
-      </test>
-      <result>
-         <assert-xml><![CDATA[<out><b>primary stylesheet</b><a> next match </a></out>]]></assert-xml>
-      </result>
-   </test-case>
-
-   <test-case name="whitespace-0105">
-      <description> Test that whitespace text nodes as children of xsl:apply-templates which has
-         @xml:space=preserve do not interfere with processing of the instruction. </description>
-      <created by="Michael Kay" on="2012-10-30"/>
-      <environment ref="whitespace-01"/>
-      <dependencies>
-         <spec value="XSLT10+"/>
-      </dependencies>
-      <test>
-         <stylesheet file="whitespace-0105.xsl"/>
-      </test>
-      <result>
-         <assert-xml><![CDATA[<out><b>template for root</b><a> template for doc </a></out>]]></assert-xml>
-      </result>
-   </test-case>
-
-   <test-case name="whitespace-0106">
-      <description> Test that whitespace text nodes as children of xsl:attribute-set which has
-         @xml:space=preserve do not interfere with processing of the instruction. </description>
-      <created by="Michael Kay" on="2012-10-30"/>
-      <environment ref="whitespace-01"/>
-      <dependencies>
-         <spec value="XSLT10+"/>
-      </dependencies>
-      <test>
-         <stylesheet file="whitespace-0106.xsl"/>
-      </test>
-      <result>
-         <assert-xml><![CDATA[<out><item color="red" number="2"/></out>]]></assert-xml>
-      </result>
-   </test-case>
-
-   <test-case name="whitespace-0107">
-      <description> Test that whitespace text nodes as children of xsl:call-template which has
-         @xml:space=preserve do not interfere with processing of the instruction. </description>
+   <test-case name="whitespace-004">
+      <description>
+         Was: whitespace-0104
+         Test that whitespace text nodes as children of xsl:next-match which has
+         @xml:space=preserve do not interfere with processing of the instruction.
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="whitespace-01"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-0107.xsl"/>
+         <stylesheet file="whitespace-004.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><b>primary stylesheet</b><a> next match </a></out>]]></assert-xml>
+      </result>
+   </test-case>
+
+   <test-case name="whitespace-005">
+      <description>
+         Was: whitespace-0105
+         Test that whitespace text nodes as children of xsl:apply-templates which has
+         @xml:space=preserve do not interfere with processing of the instruction.
+      </description>
+      <created by="Michael Kay" on="2012-10-30"/>
+      <environment ref="whitespace-01"/>
+      <dependencies>
+         <spec value="XSLT10+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="whitespace-005.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><b>template for root</b><a> template for doc </a></out>]]></assert-xml>
+      </result>
+   </test-case>
+
+   <test-case name="whitespace-006">
+      <description>
+         Was: whitespace-0106
+         Test that whitespace text nodes as children of xsl:attribute-set which has
+         @xml:space=preserve do not interfere with processing of the instruction.
+      </description>
+      <created by="Michael Kay" on="2012-10-30"/>
+      <environment ref="whitespace-01"/>
+      <dependencies>
+         <spec value="XSLT10+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="whitespace-006.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><item color="red" number="2"/></out>]]></assert-xml>
+      </result>
+   </test-case>
+
+   <test-case name="whitespace-007">
+      <description>
+         Was: whitespace-0107
+         Test that whitespace text nodes as children of xsl:call-template which has
+         @xml:space=preserve do not interfere with processing of the instruction.
+      </description>
+      <created by="Michael Kay" on="2012-10-30"/>
+      <environment ref="whitespace-01"/>
+      <dependencies>
+         <spec value="XSLT10+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="whitespace-007.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out><b>template for doc</b><a> temp template </a></out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-0108">
-      <description> Test that whitespace text nodes as children of xsl:choose which has
-         @xml:space=preserve do not interfere with processing of the instruction. </description>
+   <test-case name="whitespace-008">
+      <description>
+         Was: whitespace-0108
+         Test that whitespace text nodes as children of xsl:choose which has
+         @xml:space=preserve do not interfere with processing of the instruction.
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="whitespace-01"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-0108.xsl"/>
+         <stylesheet file="whitespace-008.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out><a>true</a></out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-0109">
-      <description> Test that whitespace text nodes as children of xsl:stylesheet which has
-         @xml:space=preserve do not interfere with processing of the instruction. </description>
+   <test-case name="whitespace-009">
+      <description>
+         Was: whitespace-0109
+         Test that whitespace text nodes as children of xsl:stylesheet which has
+         @xml:space=preserve do not interfere with processing of the instruction.
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="whitespace-01"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-0109.xsl"/>
+         <stylesheet file="whitespace-009.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out>test</out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-0110">
-      <description>Test that whitespace text nodes as children of xsl:transform which has
-         @xml:space=preserve do not interfere with processing of the instruction. </description>
+   <test-case name="whitespace-010">
+      <description>
+         Was: whitespace-0110
+         Test that whitespace text nodes as children of xsl:transform which has
+         @xml:space=preserve do not interfere with processing of the instruction.
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="whitespace-01"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-0110.xsl"/>
+         <stylesheet file="whitespace-010.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out>test</out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-0111">
-      <description>Test referencing an internal whitespace entity and an external parameter
-         whitespace entity defined in a DTD.</description>
+   <test-case name="whitespace-011">
+      <description>
+         Was: whitespace-0111
+         Test referencing an internal whitespace entity and an external parameter
+         whitespace entity defined in a DTD.
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
       <environment ref="whitespace-01"/>
@@ -226,7 +259,7 @@
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-0111.xsl"/>
+         <stylesheet file="whitespace-011.xsl"/>
          <output serialize="yes"/>
       </test>
       <result>
@@ -237,50 +270,59 @@
       </result>
    </test-case>
 
-   <test-case name="whitespace-0112">
-      <description> Test with LRE that contains two text nodes with comment in between. First text
+   <test-case name="whitespace-012">
+      <description>
+         Was: whitespace-0112
+         Test with LRE that contains two text nodes with comment in between. First text
          node has whitespace only. Cases tested: - second text node starts with whitespace - second
-         text node does not start with whitespace</description>
+         text node does not start with whitespace
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="whitespace-01"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-0112.xsl"/>
+         <stylesheet file="whitespace-012.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out><e>   h   </e><e>   h   </e></out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-0113">
-      <description> Test with LRE that contains two text nodes with processing-instruction in
+   <test-case name="whitespace-013">
+      <description>
+         Was: whitespace-0113
+         Test with LRE that contains two text nodes with processing-instruction in
          between. First text node has whitespace only. Cases tested: - second text node starts with
-         whitespace - second text node does not start with whitespace </description>
+         whitespace - second text node does not start with whitespace 
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="whitespace-01"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-0113.xsl"/>
+         <stylesheet file="whitespace-013.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out><e>   h</e><e>h   </e></out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-0201">
-      <description> Test with whitespace text nodes as preceding-siblings of xsl:param. Parent has
-         @xml:space=preserve. Whitespace must be stripped. </description>
+   <test-case name="whitespace-014">
+      <description>
+         Was: whitespace-0201
+         Test with whitespace text nodes as preceding-siblings of xsl:param. Parent has
+         @xml:space=preserve. Whitespace must be stripped.
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="whitespace-02"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-0201.xsl"/>
+         <stylesheet file="whitespace-014.xsl"/>
       </test>
       <result>
          <all-of>
@@ -290,61 +332,64 @@
       </result>
    </test-case>
 
-   <test-case name="whitespace-0301">
-      <description> Test with whitespace text nodes as preceding-siblings of xsl:sort. Parent has
-         @xml:space=preserve. Whitespace must be stripped. </description>
+   <test-case name="whitespace-015">
+      <description>
+         Was: whitespace-0201
+         Test with whitespace text nodes as preceding-siblings of xsl:sort. Parent has
+         @xml:space=preserve. Whitespace must be stripped.
+      </description>
       <created by="Michael Kay" on="2012-10-30"/>
       <environment ref="whitespace-03"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-0301.xsl"/>
+         <stylesheet file="whitespace-015.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<o>32 32 9 32 10 32 13 10 32 32 9 32 10 32 13 10</o>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-1001">
-      <description/>
+   <test-case name="whitespace-016">
+      <description>Was: whitespace-1001</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="whitespace-10"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-1001.xsl"/>
+         <stylesheet file="whitespace-016.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out> </out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-1002">
-      <description/>
+   <test-case name="whitespace-017">
+      <description>Was: whitespace-1002</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="whitespace-10"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-1002.xsl"/>
+         <stylesheet file="whitespace-017.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out/>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-1003">
-      <description/>
+   <test-case name="whitespace-018">
+      <description>Was: whitespace-1003</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="whitespace-10"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-1003.xsl"/>
+         <stylesheet file="whitespace-018.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out>
@@ -353,15 +398,15 @@
       </result>
    </test-case>
 
-   <test-case name="whitespace-1004">
-      <description/>
+   <test-case name="whitespace-019">
+      <description>Was: whitespace-1004</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="whitespace-10"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-1004.xsl"/>
+         <stylesheet file="whitespace-019.xsl"/>
       </test>
       <result>
          <!-- result is a tree containing a document node owning a text node -->
@@ -373,45 +418,45 @@
       </result>
    </test-case>
 
-   <test-case name="whitespace-1005">
-      <description/>
+   <test-case name="whitespace-020">
+      <description>Was: whitespace-1005</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="whitespace-10"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-1005.xsl"/>
+         <stylesheet file="whitespace-020.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out><foo/></out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-1201">
-      <description/>
+   <test-case name="whitespace-021">
+      <description>Was: whitespace-1201</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="whitespace-12"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-1201.xsl"/>
+         <stylesheet file="whitespace-021.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out> test </out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-1202">
-      <description/>
+   <test-case name="whitespace-022">
+      <description>Was: whitespace-1202</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="whitespace-12"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-1202.xsl"/>
+         <stylesheet file="whitespace-022.xsl"/>
       </test>
       <result>
          <all-of>
@@ -421,15 +466,15 @@
       </result>
    </test-case>
 
-   <test-case name="whitespace-1203">
-      <description/>
+   <test-case name="whitespace-023">
+      <description>Was: whitespace-1203</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="whitespace-12"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-1203.xsl"/>
+         <stylesheet file="whitespace-023.xsl"/>
       </test>
       <result>
          <all-of>
@@ -439,8 +484,8 @@
       </result>
    </test-case>
 
-   <test-case name="whitespace-1301">
-      <description/>
+   <test-case name="whitespace-024">
+      <description>Was: whitespace-1301</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment>
          <source role=".">
@@ -453,22 +498,22 @@
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-1301.xsl"/>
+         <stylesheet file="whitespace-024.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out/>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-1701">
-      <description/>
+   <test-case name="whitespace-025">
+      <description>Was: whitespace-1701</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="whitespace-17"/>
       <dependencies>
          <spec value="XSLT20+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-1701.xsl"/>
+         <stylesheet file="whitespace-025.xsl"/>
       </test>
       <result>
          <all-of>
@@ -478,46 +523,48 @@
       </result>
    </test-case>
 
-   <test-case name="whitespace-1702">
-      <description/>
+   <test-case name="whitespace-026">
+      <description>Was: whitespace-1702</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="whitespace-17"/>
       <dependencies>
          <spec value="XSLT20+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-1702.xsl"/>
+         <stylesheet file="whitespace-026.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out><!--[[[fred]]]--><!--[[[ fred ]]]--></out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-1703">
-      <description/>
+   <test-case name="whitespace-027">
+      <description>Was: whitespace-1703</description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="whitespace-17"/>
       <dependencies>
          <spec value="XSLT20+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-1703.xsl"/>
+         <stylesheet file="whitespace-027.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<out><?p [[[fred]]]?><?q [[[ fred ]]]?></out>]]></assert-xml>
       </result>
    </test-case>
 
-   <test-case name="whitespace-1705">
-      <description>liberal use of whitespace in attribute values in the stylesheet: see erratum
-         E2</description>
+   <test-case name="whitespace-028">
+      <description>
+         Was: whitespace-1705
+         liberal use of whitespace in attribute values in the stylesheet: see erratum E2
+      </description>
       <created by="Michael Kay" on="2012-11-07"/>
       <environment ref="whitespace-17"/>
       <dependencies>
          <spec value="XSLT10+"/>
       </dependencies>
       <test>
-         <stylesheet file="whitespace-1705.xsl"/>
+         <stylesheet file="whitespace-028.xsl"/>
       </test>
       <result>
          <assert-xml><![CDATA[<document><section/><section/><section/></document>]]></assert-xml>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-001.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Test that whitespace text nodes as children of xsl:analyze-string which has @xml:space=preserve do not 
+				interfere with processing of the instruction. -->
+
+   <t:template match="doc">
+      <out>
+         <E1>
+            <t:analyze-string select="'abracadabra'" regex="bra" xml:space="preserve">
+    		
+    	  	 &#xD;  
+
+    	         
+    	<t:matching-substring><t:value-of select="'*'"/></t:matching-substring>
+    	
+    	  	 &#xD;  
+
+    	<t:non-matching-substring><t:value-of select="."/></t:non-matching-substring>
+    	</t:analyze-string>
+         </E1>
+      </out>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-002.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+
+ <!-- Purpose: Test that whitespace text nodes as children of xsl:apply-imports which 
+  has @xml:space=preserve do not interfere with processing of the instruction. -->
+
+
+ <t:import href="import1.xsl"/>
+
+ <t:template match="doc">
+  <out>
+   <b>primary stylesheet</b>
+   <t:apply-imports xml:space="preserve">
+		
+			&#x20; &#x9; &#xD;  &#xA;
+			   
+		</t:apply-imports>
+  </out>
+ </t:template>
+
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-003.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Test that whitespace text nodes as children of xsl:character-map 
+  				which has @xml:space=preserve do not interfere with processing of the instruction. -->
+
+   <t:character-map name="temp" xml:space="preserve">
+		  
+			 &#xD;  
+		
+
+  <t:output-character character="a" string="b"/>
+  	 &#xD;   
+</t:character-map>
+
+   <t:template match="doc">
+	     <t:result-document use-character-maps="temp">
+		       <out>bababa</out>
+	     </t:result-document>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-004.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Test that whitespace text nodes as children of 
+  				xsl:next-match which has @xml:space=preserve do 
+  				not interfere with processing of the instruction. -->
+
+   <t:template match="doc">
+	     <out>
+         <b>primary stylesheet</b>
+         <t:next-match xml:space="preserve">
+		
+			  	 &#xD;  
+
+			   
+		</t:next-match>
+      </out>
+   </t:template>
+
+   <t:template match="*">
+      <a xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> next match </a>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-005.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Test that whitespace text nodes as children of xsl:apply-templates which 
+  				has @xml:space=preserve do not interfere with processing of the instruction. -->
+
+   <t:template match="/">
+	     <out>
+         <b>template for root</b>
+         <t:apply-templates select="doc" xml:space="preserve">
+		
+			  	 &#xD;  
+
+			   
+		</t:apply-templates>
+      </out>
+   </t:template>
+
+   <t:template match="doc">
+      <a xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> template for doc </a>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-006.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Test that whitespace text nodes as children of xsl:attribute-set which 
+  				has @xml:space=preserve do not interfere with processing of the instruction. -->
+
+   <t:attribute-set name="set1" xml:space="preserve">
+			
+	  	 &#xD;  
+
+
+  <t:attribute name="color">red</t:attribute>
+  					        	  
+  			<t:attribute name="number">2</t:attribute>
+</t:attribute-set>
+
+   <t:template match="/">
+      <out>
+         <item t:use-attribute-sets="set1"/>
+      </out>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-007.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Test that whitespace text nodes as children of xsl:call-template which 
+  				has @xml:space=preserve do not interfere with processing of the instruction. -->
+
+   <t:template match="/doc">
+	     <out>
+         <b>template for doc</b>
+         <t:call-template name="temp" xml:space="preserve">
+		
+			  	 &#xD;  
+
+			   
+		</t:call-template>
+      </out>
+   </t:template>
+
+   <t:template name="temp">
+      <a xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> temp template </a>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-008.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Test that whitespace text nodes as children of xsl:choose which 
+  				has @xml:space=preserve do not interfere with processing of the instruction. -->
+
+   <t:template match="/doc">
+	     <out>
+         <t:choose xml:space="preserve">
+			  
+				 
+			&#xD;  
+			
+
+						
+			<t:when test="false()"><b>false</b></t:when>
+			
+			  	 &#xD;  
+
+			
+			<t:when test="true()"><a>true</a></t:when>
+			
+			<t:otherwise><c>false</c></t:otherwise>
+			
+			  	 &#xD;  
+
+		</t:choose>
+      </out>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-009.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0" xml:space="preserve">
+<!-- Purpose: Test that whitespace text nodes as children of xsl:stylesheet which 
+  				has @xml:space=preserve do not interfere with processing of the instruction. -->
+
+<t:template match="/doc"><out>test</out></t:template></t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-010.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0" xml:space="preserve">
+
+  
+  
+  
+  
+  
+  
+<!-- Purpose: Test that whitespace text nodes as children of xsl:transform which 
+  				has @xml:space=preserve do not interfere with processing of the instruction. -->
+
+	  
+				 
+		&#xD;  
+			
+
+
+			    
+<t:template match="/doc"><out>test</out></t:template>
+  	 &#xD;  
+
+
+
+
+
+</t:transform>
--- a/tests/misc/whitespace/whitespace-0101.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test that whitespace text nodes as children of xsl:analyze-string which has @xml:space=preserve do not 
-				interfere with processing of the instruction. -->
-
-   <t:template match="doc">
-      <out>
-         <E1>
-            <t:analyze-string select="'abracadabra'" regex="bra" xml:space="preserve">
-    		
-    	  	 &#xD;  
-
-    	         
-    	<t:matching-substring><t:value-of select="'*'"/></t:matching-substring>
-    	
-    	  	 &#xD;  
-
-    	<t:non-matching-substring><t:value-of select="."/></t:non-matching-substring>
-    	</t:analyze-string>
-         </E1>
-      </out>
-   </t:template>
-</t:transform>
--- a/tests/misc/whitespace/whitespace-0102.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<?xml version="1.0"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-
- <!-- Purpose: Test that whitespace text nodes as children of xsl:apply-imports which 
-  has @xml:space=preserve do not interfere with processing of the instruction. -->
-
-
- <t:import href="import1.xsl"/>
-
- <t:template match="doc">
-  <out>
-   <b>primary stylesheet</b>
-   <t:apply-imports xml:space="preserve">
-		
-			&#x20; &#x9; &#xD;  &#xA;
-			   
-		</t:apply-imports>
-  </out>
- </t:template>
-
-</t:transform>
--- a/tests/misc/whitespace/whitespace-0103.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test that whitespace text nodes as children of xsl:character-map 
-  				which has @xml:space=preserve do not interfere with processing of the instruction. -->
-
-   <t:character-map name="temp" xml:space="preserve">
-		  
-			 &#xD;  
-		
-
-  <t:output-character character="a" string="b"/>
-  	 &#xD;   
-</t:character-map>
-
-   <t:template match="doc">
-	     <t:result-document use-character-maps="temp">
-		       <out>bababa</out>
-	     </t:result-document>
-   </t:template>
-</t:transform>
--- a/tests/misc/whitespace/whitespace-0104.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test that whitespace text nodes as children of 
-  				xsl:next-match which has @xml:space=preserve do 
-  				not interfere with processing of the instruction. -->
-
-   <t:template match="doc">
-	     <out>
-         <b>primary stylesheet</b>
-         <t:next-match xml:space="preserve">
-		
-			  	 &#xD;  
-
-			   
-		</t:next-match>
-      </out>
-   </t:template>
-
-   <t:template match="*">
-      <a xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> next match </a>
-   </t:template>
-</t:transform>
--- a/tests/misc/whitespace/whitespace-0105.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test that whitespace text nodes as children of xsl:apply-templates which 
-  				has @xml:space=preserve do not interfere with processing of the instruction. -->
-
-   <t:template match="/">
-	     <out>
-         <b>template for root</b>
-         <t:apply-templates select="doc" xml:space="preserve">
-		
-			  	 &#xD;  
-
-			   
-		</t:apply-templates>
-      </out>
-   </t:template>
-
-   <t:template match="doc">
-      <a xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> template for doc </a>
-   </t:template>
-</t:transform>
--- a/tests/misc/whitespace/whitespace-0106.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test that whitespace text nodes as children of xsl:attribute-set which 
-  				has @xml:space=preserve do not interfere with processing of the instruction. -->
-
-   <t:attribute-set name="set1" xml:space="preserve">
-			
-	  	 &#xD;  
-
-
-  <t:attribute name="color">red</t:attribute>
-  					        	  
-  			<t:attribute name="number">2</t:attribute>
-</t:attribute-set>
-
-   <t:template match="/">
-      <out>
-         <item t:use-attribute-sets="set1"/>
-      </out>
-   </t:template>
-</t:transform>
--- a/tests/misc/whitespace/whitespace-0107.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test that whitespace text nodes as children of xsl:call-template which 
-  				has @xml:space=preserve do not interfere with processing of the instruction. -->
-
-   <t:template match="/doc">
-	     <out>
-         <b>template for doc</b>
-         <t:call-template name="temp" xml:space="preserve">
-		
-			  	 &#xD;  
-
-			   
-		</t:call-template>
-      </out>
-   </t:template>
-
-   <t:template name="temp">
-      <a xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> temp template </a>
-   </t:template>
-</t:transform>
--- a/tests/misc/whitespace/whitespace-0108.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test that whitespace text nodes as children of xsl:choose which 
-  				has @xml:space=preserve do not interfere with processing of the instruction. -->
-
-   <t:template match="/doc">
-	     <out>
-         <t:choose xml:space="preserve">
-			  
-				 
-			&#xD;  
-			
-
-						
-			<t:when test="false()"><b>false</b></t:when>
-			
-			  	 &#xD;  
-
-			
-			<t:when test="true()"><a>true</a></t:when>
-			
-			<t:otherwise><c>false</c></t:otherwise>
-			
-			  	 &#xD;  
-
-		</t:choose>
-      </out>
-   </t:template>
-</t:transform>
--- a/tests/misc/whitespace/whitespace-0109.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0" xml:space="preserve">
-<!-- Purpose: Test that whitespace text nodes as children of xsl:stylesheet which 
-  				has @xml:space=preserve do not interfere with processing of the instruction. -->
-
-<t:template match="/doc"><out>test</out></t:template></t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-011.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!DOCTYPE t:stylesheet [ 
+<!ENTITY br "<t:text>&#xa;</t:text>">
+<!ENTITY % ext SYSTEM "entity.ent">%ext;
+]>
+
+<t:stylesheet xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+
+  <!-- Purpose: Test referencing an internal whitespace entity 
+  				and an external parameter whitespace entity defined 
+  				in a DTD. -->
+
+  <t:template match="/doc">
+    <out>
+      <a><t:text>&#xa;</t:text> &br;</a>
+      <b>&space;test</b>
+    </out>
+  </t:template>
+
+</t:stylesheet>
--- a/tests/misc/whitespace/whitespace-0110.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0" xml:space="preserve">
-
-  
-  
-  
-  
-  
-  
-<!-- Purpose: Test that whitespace text nodes as children of xsl:transform which 
-  				has @xml:space=preserve do not interfere with processing of the instruction. -->
-
-	  
-				 
-		&#xD;  
-			
-
-
-			    
-<t:template match="/doc"><out>test</out></t:template>
-  	 &#xD;  
-
-
-
-
-
-</t:transform>
--- a/tests/misc/whitespace/whitespace-0111.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE t:stylesheet [ 
-<!ENTITY br "<t:text>&#xa;</t:text>">
-<!ENTITY % ext SYSTEM "entity.ent">%ext;
-]>
-
-<t:stylesheet xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-
-  <!-- Purpose: Test referencing an internal whitespace entity 
-  				and an external parameter whitespace entity defined 
-  				in a DTD. -->
-
-  <t:template match="/doc">
-    <out>
-      <a><t:text>&#xa;</t:text> &br;</a>
-      <b>&space;test</b>
-    </out>
-  </t:template>
-
-</t:stylesheet>
--- a/tests/misc/whitespace/whitespace-0112.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test with LRE that contains two text nodes with comment in between. 
-  				First text node has whitespace only. Cases tested:
-				- second text node starts with whitespace
-				- second text node does not start with whitespace -->
-   <!-- Note that the comment is removed before whitespace stripping. -->
-
-   <t:template match="/">
-      <out>
-         <e>   h<!--c-->   </e>
-         <e>   <!--c-->h   </e>
-      </out>
-   </t:template>
-</t:transform>
--- a/tests/misc/whitespace/whitespace-0113.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test with LRE that contains two text nodes with processing-instruction in 
-  				between. First text node has whitespace only. Cases tested:
-				- second text node starts with whitespace
-				- second text node does not start with whitespace -->
-
-   <t:template match="/">
-      <out>
-         <e>   <?pi?>h</e>
-         <e>h<?pi?>   </e>
-      </out>
-   </t:template>
-</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-012.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Test with LRE that contains two text nodes with comment in between. 
+  				First text node has whitespace only. Cases tested:
+				- second text node starts with whitespace
+				- second text node does not start with whitespace -->
+   <!-- Note that the comment is removed before whitespace stripping. -->
+
+   <t:template match="/">
+      <out>
+         <e>   h<!--c-->   </e>
+         <e>   <!--c-->h   </e>
+      </out>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-013.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Test with LRE that contains two text nodes with processing-instruction in 
+  				between. First text node has whitespace only. Cases tested:
+				- second text node starts with whitespace
+				- second text node does not start with whitespace -->
+
+   <t:template match="/">
+      <out>
+         <e>   <?pi?>h</e>
+         <e>h<?pi?>   </e>
+      </out>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-014.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Test with whitespace text nodes as preceding-siblings of xsl:param. 
+  				Parent has @xml:space=preserve. Whitespace must be stripped. -->
+
+   <t:template match="doc">
+      <out>
+         <t:call-template name="inner">
+            <t:with-param name="child" select="top-node/rubbish"/>
+         </t:call-template>
+         <t:apply-templates select="top-node">
+            <t:with-param name="child" select="top-node/rubbish"/>
+         </t:apply-templates>
+      </out>
+   </t:template>
+
+   <t:template name="inner" xml:space="preserve">
+   
+				 
+		&#xD;  
+			
+
+<t:param name="child"/>
+<a><t:value-of select="$child/text()"/></a>
+</t:template>
+
+   <t:template match="top-node" xml:space="preserve">
+    
+				 
+		&#xD;  
+			
+
+ 	
+<t:param name="child"/>
+<b><t:value-of select="$child/text()"/></b>
+</t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-015.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<!-- Purpose: Test with whitespace text nodes as preceding-siblings of xsl:sort. 
+  				Parent has @xml:space=preserve. Whitespace must be stripped. -->
+
+   <t:template match="/doc">
+      <t:variable name="out">
+         <out>
+            <t:for-each select="foo" xml:space="preserve">
+	<t:sort/>  	 
+
+<t:sort/>  	 
+ &#xD;
+</t:for-each>
+         </out>
+      </t:variable>
+      <o xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+         <t:value-of select="string-to-codepoints($out/out)"/>
+      </o>
+   </t:template>
+</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-016.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+
+  <?spec xslt#xsl-text?>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:text> </xsl:text>
+    </out>
+  </xsl:template>
+ 
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-017.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,12 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+
+  <?spec xslt#literal-text-nodes?>
+
+  <xsl:template match="/"><out>
+      <![CDATA[
+      ]]>
+      </out></xsl:template>
+ 
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-018.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+
+  <?spec xslt#literal-text-nodes?>
+
+  <xsl:template match="/"><out>
+      x
+      </out></xsl:template>
+ 
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-019.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+
+  <!-- output text as child of document node -->
+
+  <xsl:template match="/">
+      x
+      </xsl:template>
+ 
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-020.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,13 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#literal-text-nodes?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+
+  <xsl:template match="/">
+    <out>
+      <foo>&#32;</foo>
+    </out>
+  </xsl:template>
+ 
+</xsl:stylesheet>
--- a/tests/misc/whitespace/whitespace-0201.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test with whitespace text nodes as preceding-siblings of xsl:param. 
-  				Parent has @xml:space=preserve. Whitespace must be stripped. -->
-
-   <t:template match="doc">
-      <out>
-         <t:call-template name="inner">
-            <t:with-param name="child" select="top-node/rubbish"/>
-         </t:call-template>
-         <t:apply-templates select="top-node">
-            <t:with-param name="child" select="top-node/rubbish"/>
-         </t:apply-templates>
-      </out>
-   </t:template>
-
-   <t:template name="inner" xml:space="preserve">
-   
-				 
-		&#xD;  
-			
-
-<t:param name="child"/>
-<a><t:value-of select="$child/text()"/></a>
-</t:template>
-
-   <t:template match="top-node" xml:space="preserve">
-    
-				 
-		&#xD;  
-			
-
- 	
-<t:param name="child"/>
-<b><t:value-of select="$child/text()"/></b>
-</t:template>
-</t:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-021.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#literal-text-nodes?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+  <xsl:template match="/">
+    <out> <![CDATA[test]]> </out>
+  </xsl:template>
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-022.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#literal-text-nodes?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+  <xsl:output indent="yes"/>
+  <xsl:template match="/">test</xsl:template>
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-023.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,8 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#strip?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+  <xsl:output indent="yes"/>
+  <xsl:template match="/"><xsl:copy-of select="doc/foo/text()"/></xsl:template>
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-024.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,9 @@
+<?xml version="1.0"?> 
+
+<?spec xslt#literal-result-element?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+  <xsl:template match="/">
+    <out/>
+  </xsl:template>
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-025.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,25 @@
+<xsl:stylesheet version="2.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:foo="http://whatever">
+  
+  <?spec xslt#creating-text-nodes?>
+
+  <xsl:function name="foo:write1" as="xs:string*">
+    <xsl:param name="x" as="xs:string"/>
+    <xsl:value-of select="$x"/>
+  </xsl:function>
+
+  <xsl:function name="foo:write2" as="text()*">
+    <xsl:param name="x" as="xs:string"/>
+    <xsl:text>'</xsl:text><xsl:value-of select="$x"/><xsl:text>'</xsl:text>
+  </xsl:function>
+
+  <xsl:template match="/">
+    <xsl:text>'</xsl:text>
+    <xsl:value-of select="foo:write1('test')"/>
+    <xsl:text>'</xsl:text>
+    <xsl:value-of select="foo:write2('test')"/>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-026.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,14 @@
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
+
+<?spec xslt#creating-comments?>
+
+<xsl:template match="/">
+<out>
+  <xsl:comment>[[[<xsl:value-of select="'fred'"/>]]]</xsl:comment>
+  <xsl:comment select="'[[[', 'fred', ']]]'"/>
+</out>
+</xsl:template>
+        
+</xsl:stylesheet>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-027.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,14 @@
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
+
+<?spec xslt#creating-processing-instructions?>
+
+<xsl:template match="/">
+<out>
+  <xsl:processing-instruction name="p">[[[<xsl:value-of select="'fred'"/>]]]</xsl:processing-instruction>
+  <xsl:processing-instruction name="q" select="'[[[', 'fred', ']]]'"/>
+</out>
+</xsl:template>
+        
+</xsl:stylesheet>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/whitespace/whitespace-028.xsl	Fri Apr 03 04:16:02 2015 +0200
@@ -0,0 +1,23 @@
+<xsl:stylesheet version="    2.0 "
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  
+  <!-- liberal use of whitespace in stylesheet attributes  -->
+        <?spec xslt#strip?>
+
+  <xsl:output method="
+    &#x20;xml&#x20;
+    " indent="
+    &#x0a;no&#x09;" />
+
+  <xsl:strip-space elements="  document "/>
+
+
+  <xsl:template match="@*&#x09;|&#x09;node()" default-collation=" http://random/collation &#x9; http://www.w3.org/2005/xpath-functions/collation/codepoint  ">
+    <xsl:element name="  {  concat(' ', name(), ' ')  }  ">
+      <xsl:copy-of select=" @ * "  copy-namespaces="  yes  "/> 
+      <xsl:apply-templates select="@*&#x09;|&#x09;node()"/>
+    </xsl:element>
+  </xsl:template>
+  
+
+</xsl:stylesheet>
--- a/tests/misc/whitespace/whitespace-0301.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0">
-<!-- Purpose: Test with whitespace text nodes as preceding-siblings of xsl:sort. 
-  				Parent has @xml:space=preserve. Whitespace must be stripped. -->
-
-   <t:template match="/doc">
-      <t:variable name="out">
-         <out>
-            <t:for-each select="foo" xml:space="preserve">
-	<t:sort/>  	 
-
-<t:sort/>  	 
- &#xD;
-</t:for-each>
-         </out>
-      </t:variable>
-      <o xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-         <t:value-of select="string-to-codepoints($out/out)"/>
-      </o>
-   </t:template>
-</t:transform>
--- a/tests/misc/whitespace/whitespace-1001.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0"?> 
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-
-  <?spec xslt#xsl-text?>
-
-  <xsl:template match="/">
-    <out>
-      <xsl:text> </xsl:text>
-    </out>
-  </xsl:template>
- 
-</xsl:stylesheet>
--- a/tests/misc/whitespace/whitespace-1002.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-<?xml version="1.0"?> 
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-
-  <?spec xslt#literal-text-nodes?>
-
-  <xsl:template match="/"><out>
-      <![CDATA[
-      ]]>
-      </out></xsl:template>
- 
-</xsl:stylesheet>
--- a/tests/misc/whitespace/whitespace-1003.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?> 
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-
-  <?spec xslt#literal-text-nodes?>
-
-  <xsl:template match="/"><out>
-      x
-      </out></xsl:template>
- 
-</xsl:stylesheet>
--- a/tests/misc/whitespace/whitespace-1004.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0"?> 
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-
-  <!-- output text as child of document node -->
-
-  <xsl:template match="/">
-      x
-      </xsl:template>
- 
-</xsl:stylesheet>
--- a/tests/misc/whitespace/whitespace-1005.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0"?> 
-
-<?spec xslt#literal-text-nodes?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-
-  <xsl:template match="/">
-    <out>
-      <foo>&#32;</foo>
-    </out>
-  </xsl:template>
- 
-</xsl:stylesheet>
--- a/tests/misc/whitespace/whitespace-1201.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<?xml version="1.0"?> 
-
-<?spec xslt#literal-text-nodes?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-  <xsl:template match="/">
-    <out> <![CDATA[test]]> </out>
-  </xsl:template>
-</xsl:stylesheet>
--- a/tests/misc/whitespace/whitespace-1202.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0"?> 
-
-<?spec xslt#literal-text-nodes?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-  <xsl:output indent="yes"/>
-  <xsl:template match="/">test</xsl:template>
-</xsl:stylesheet>
--- a/tests/misc/whitespace/whitespace-1203.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0"?> 
-
-<?spec xslt#strip?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-  <xsl:output indent="yes"/>
-  <xsl:template match="/"><xsl:copy-of select="doc/foo/text()"/></xsl:template>
-</xsl:stylesheet>
--- a/tests/misc/whitespace/whitespace-1301.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<?xml version="1.0"?> 
-
-<?spec xslt#literal-result-element?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
-  <xsl:template match="/">
-    <out/>
-  </xsl:template>
-</xsl:stylesheet>
--- a/tests/misc/whitespace/whitespace-1701.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-<xsl:stylesheet version="2.0" 
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xs="http://www.w3.org/2001/XMLSchema"
-  xmlns:foo="http://whatever">
-  
-  <?spec xslt#creating-text-nodes?>
-
-  <xsl:function name="foo:write1" as="xs:string*">
-    <xsl:param name="x" as="xs:string"/>
-    <xsl:value-of select="$x"/>
-  </xsl:function>
-
-  <xsl:function name="foo:write2" as="text()*">
-    <xsl:param name="x" as="xs:string"/>
-    <xsl:text>'</xsl:text><xsl:value-of select="$x"/><xsl:text>'</xsl:text>
-  </xsl:function>
-
-  <xsl:template match="/">
-    <xsl:text>'</xsl:text>
-    <xsl:value-of select="foo:write1('test')"/>
-    <xsl:text>'</xsl:text>
-    <xsl:value-of select="foo:write2('test')"/>
-  </xsl:template>
-
-</xsl:stylesheet>
--- a/tests/misc/whitespace/whitespace-1702.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
-
-<?spec xslt#creating-comments?>
-
-<xsl:template match="/">
-<out>
-  <xsl:comment>[[[<xsl:value-of select="'fred'"/>]]]</xsl:comment>
-  <xsl:comment select="'[[[', 'fred', ']]]'"/>
-</out>
-</xsl:template>
-        
-</xsl:stylesheet>
-
--- a/tests/misc/whitespace/whitespace-1703.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
-
-<?spec xslt#creating-processing-instructions?>
-
-<xsl:template match="/">
-<out>
-  <xsl:processing-instruction name="p">[[[<xsl:value-of select="'fred'"/>]]]</xsl:processing-instruction>
-  <xsl:processing-instruction name="q" select="'[[[', 'fred', ']]]'"/>
-</out>
-</xsl:template>
-        
-</xsl:stylesheet>
-
--- a/tests/misc/whitespace/whitespace-1705.xsl	Fri Apr 03 03:20:42 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-<xsl:stylesheet version="    2.0 "
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  
-  <!-- liberal use of whitespace in stylesheet attributes  -->
-        <?spec xslt#strip?>
-
-  <xsl:output method="
-    &#x20;xml&#x20;
-    " indent="
-    &#x0a;no&#x09;" />
-
-  <xsl:strip-space elements="  document "/>
-
-
-  <xsl:template match="@*&#x09;|&#x09;node()" default-collation=" http://random/collation &#x9; http://www.w3.org/2005/xpath-functions/collation/codepoint  ">
-    <xsl:element name="  {  concat(' ', name(), ' ')  }  ">
-      <xsl:copy-of select=" @ * "  copy-namespaces="  yes  "/> 
-      <xsl:apply-templates select="@*&#x09;|&#x09;node()"/>
-    </xsl:element>
-  </xsl:template>
-  
-
-</xsl:stylesheet>