Two more, may need discussion, both Saxon and Exselt throw on this, but I think they are correct
authorabraaksm
Tue, 09 Feb 2016 07:30:31 +0100
changeset 1229 e270be25ddc5
parent 1228 8f2f0982148d
child 1242 6dcc7f162584
Two more, may need discussion, both Saxon and Exselt throw on this, but I think they are correct
tests/misc/seqtor/_seqtor-test-set.xml
tests/misc/seqtor/seqtor-041.xsl
tests/misc/seqtor/seqtor-042.xsl
--- a/tests/misc/seqtor/_seqtor-test-set.xml	Tue Feb 09 07:16:23 2016 +0100
+++ b/tests/misc/seqtor/_seqtor-test-set.xml	Tue Feb 09 07:30:31 2016 +0100
@@ -665,6 +665,28 @@
          <assert-xml><![CDATA[<bar>||</bar>]]></assert-xml>
       </result>
    </test-case>
+   
+   <test-case name="seqtor-041">
+      <description>Constructing simple content, multiple empty text nodes in variable</description>
+      <created by="Abel Braaksma" on="2016-01-23"/>
+      <test>
+         <stylesheet file="seqtor-041.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<result/>]]></assert-xml>
+      </result>
+   </test-case>
+
+   <test-case name="seqtor-042">
+      <description>Constructing simple content, multiple text nodes in variable are merged</description>
+      <created by="Abel Braaksma" on="2016-01-23"/>
+      <test>
+         <stylesheet file="seqtor-042.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<result>non empty and more</result>]]></assert-xml>
+      </result>
+   </test-case>
 
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/seqtor/seqtor-041.xsl	Tue Feb 09 07:30:31 2016 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:math="http://www.w3.org/2005/xpath-functions/math"
+    exclude-result-prefixes="xs math"
+    version="3.0">
+    
+    <xsl:variable name="foo" as="text()">
+        <!-- multiple empty text nodes are removed -->
+        <xsl:text expand-text="yes">{ (:hello:) 'empty'[false()]}</xsl:text>
+        <xsl:text/>
+        <xsl:text expand-text="yes">{ (:hello:) 'empty'[false()]}</xsl:text>
+    </xsl:variable>
+    
+    <xsl:template match="/" name="xsl:initial-template">
+        <result><xsl:copy-of select="$foo" /></result>
+    </xsl:template>
+    
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/misc/seqtor/seqtor-042.xsl	Tue Feb 09 07:30:31 2016 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:math="http://www.w3.org/2005/xpath-functions/math"
+    exclude-result-prefixes="xs math"
+    version="3.0">
+    
+    <xsl:variable name="foo" as="text()">
+        <!-- multiple text nodes are combined into one -->
+        <xsl:text expand-text="yes">{ (:hello:) 'non-empty'}</xsl:text>
+        <xsl:text> </xsl:text>
+        <xsl:text expand-text="yes">{ (:hello:) 'and more'[true()]}</xsl:text>
+    </xsl:variable>
+    
+    <xsl:template match="/" name="xsl:initial-template">
+        <result><xsl:copy-of select="$foo" /></result>
+    </xsl:template>
+    
+</xsl:stylesheet>
\ No newline at end of file