Tests for XML comments and processing instructions straddling a text value template
authorMichael Kay <mike@saxonica.com>
Fri, 14 Dec 2018 23:27:55 +0000
changeset 1921 a79687e3ef66
parent 1920 2e7c68f619dd
child 1922 4f5c77b4f645
Tests for XML comments and processing instructions straddling a text value template
tests/attr/expand-text/cvt-043.xsl
tests/attr/expand-text/cvt-044.xsl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/expand-text/cvt-043.xsl	Fri Dec 14 23:27:55 2018 +0000
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="xs"
+    version="3.0">
+    
+    <!-- comments and PIs are stripped, then adjacent text nodes are merged -->
+    
+    <xsl:param name="p" select="'Invisible'"/>
+
+    <xsl:template name="main">
+        <out xsl:expand-text="yes">The Lord of the {str<!--please don't do this in real life-->ing($p)} Rings</out>
+    </xsl:template>
+    
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/expand-text/cvt-044.xsl	Fri Dec 14 23:27:55 2018 +0000
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="xs"
+    version="3.0">
+    
+    <!-- comments and PIs are stripped, then adjacent text nodes are merged -->
+    
+    <xsl:param name="p" select="'Invisible'"/>
+
+    <xsl:template name="main">
+        <out xsl:expand-text="yes">The Lord of the {str<?please don't do this in real life?>ing($p)} Rings</out>
+    </xsl:template>
+    
+</xsl:stylesheet>
\ No newline at end of file