New output tests
authordebbie
Fri, 08 Aug 2014 14:36:24 +0100
changeset 599 79fc2db2b426
parent 598 1bc3bddb8e5b
child 600 f6047a0547ac
New output tests
tests/decl/output/_output-test-set.xml
tests/decl/output/output-0176a.xsl
tests/decl/output/output-0176b.xsl
tests/decl/output/output-0176c.xsl
tests/decl/output/output-0176d.xsl
tests/decl/output/output-0176e.xsl
tests/decl/output/output-0176f.xsl
tests/decl/output/output-0403.xsl
tests/decl/output/output-0404.xsl
tests/decl/output/output-0405.xsl
tests/decl/output/output-0406.xsl
tests/decl/output/output-0407.xsl
tests/decl/output/output-0408.xsl
tests/fn/key/key-086.xsl
--- a/tests/decl/output/_output-test-set.xml	Thu Aug 07 17:58:26 2014 +0100
+++ b/tests/decl/output/_output-test-set.xml	Fri Aug 08 14:36:24 2014 +0100
@@ -1871,6 +1871,105 @@
          <assert-serialization method="xhtml" file="output176.out"/>
       </result>
    </test-case>
+   
+   <test-case name="output-0176a">
+      <description>Test for disabling-output-escaping="true" in xsl:text</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0176a.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output176.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0176b">
+      <description>Test for disabling-output-escaping="1" in xsl:text</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0176b.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output176.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0176c">
+      <description>Test for disabling-output-escaping=" no " in xsl:text</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0176c.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<body>&lt;p&gt;&amp;nbsp;&lt;/p&gt;</body>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0176d">
+      <description>Test for disabling-output-escaping="false" in xsl:text</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0176d.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<body>&lt;p&gt;&amp;nbsp;&lt;/p&gt;</body>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0176e">
+      <description>Test for disabling-output-escaping="0" in xsl:text</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0176e.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[<body>&lt;p&gt;&amp;nbsp;&lt;/p&gt;</body>]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0176f">
+      <description>Test for disabling-output-escaping=" " (not allowed) in xsl:text</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-01"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0176f.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
 
    <test-case name="output-0177">
       <description>Test for disabling output escaping in xsl:text</description>
@@ -3423,6 +3522,105 @@
          <error code="XTRE1620"/>
       </result>
    </test-case>
+   
+   <test-case name="output-0403">
+      <description>Test for disabling-output-escaping="true" in xsl:value-of</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-04"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0403.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output401.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0404">
+      <description>Test for disabling-output-escaping=" 1 " in xsl:value-of</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-04"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0404.xsl"/>
+      </test>
+      <result>
+         <assert-serialization method="xhtml" file="output401.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0405">
+      <description>Test for disabling-output-escaping="no" in xsl:value-of</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-04"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0405.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[&lt;p&gt;&amp;nbsp;&lt;/p&gt;]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0406">
+      <description>Test for disabling-output-escaping="false" in xsl:value-of</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-04"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0406.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[&lt;p&gt;&amp;nbsp;&lt;/p&gt;]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0407">
+      <description>Test for disabling-output-escaping="0" in xsl:value-of</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-04"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0407.xsl"/>
+      </test>
+      <result>
+         <serialization-matches><![CDATA[&lt;p&gt;&amp;nbsp;&lt;/p&gt;]]></serialization-matches>
+      </result>
+   </test-case>
+   
+   <test-case name="output-0408">
+      <description>Test for disabling-output-escaping="YES" (not allowed) in xsl:value-of</description>
+      <created by="Debbie Lockett" on="2014-08-08"/>
+      <environment ref="output-04"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+         <feature value="disabling_output_escaping"/>
+      </dependencies>
+      <test>
+         <stylesheet file="output-0408.xsl"/>
+      </test>
+      <result>
+         <any-of>
+            <assert-serialization-error code="SEPM0016"/>
+            <error code="XTSE0020"/>
+         </any-of>
+      </result>
+   </test-case>
 
    <test-case name="output-0501">
       <description>Test for missing name in xsl:character-map. Static error</description>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0176a.xsl	Fri Aug 08 14:36:24 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="true" in xsl:text -->
+
+<xsl:template match="/">
+  <html>
+    <body>
+      <xsl:text disable-output-escaping="true"><![CDATA[<p>&nbsp;</p>]]></xsl:text>
+    </body>
+  </html>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0176b.xsl	Fri Aug 08 14:36:24 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="1" in xsl:text -->
+
+<xsl:template match="/">
+  <html>
+    <body>
+      <xsl:text disable-output-escaping="1"><![CDATA[<p>&nbsp;</p>]]></xsl:text>
+    </body>
+  </html>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0176c.xsl	Fri Aug 08 14:36:24 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping=" no " in xsl:text -->
+
+<xsl:template match="/">
+  <html>
+    <body>
+      <xsl:text disable-output-escaping=" no "><![CDATA[<p>&nbsp;</p>]]></xsl:text>
+    </body>
+  </html>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0176d.xsl	Fri Aug 08 14:36:24 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="false" in xsl:text -->
+
+<xsl:template match="/">
+  <html>
+    <body>
+      <xsl:text disable-output-escaping="false"><![CDATA[<p>&nbsp;</p>]]></xsl:text>
+    </body>
+  </html>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0176e.xsl	Fri Aug 08 14:36:24 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="0" in xsl:text -->
+
+<xsl:template match="/">
+  <html>
+    <body>
+      <xsl:text disable-output-escaping="0"><![CDATA[<p>&nbsp;</p>]]></xsl:text>
+    </body>
+  </html>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0176f.xsl	Fri Aug 08 14:36:24 2014 +0100
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping=" " (not allowed) in xsl:text -->
+
+<xsl:template match="/">
+  <html>
+    <body>
+      <xsl:text disable-output-escaping=" "><![CDATA[<p>&nbsp;</p>]]></xsl:text>
+    </body>
+  </html>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0403.xsl	Fri Aug 08 14:36:24 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="true" in xsl:value-of -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping="true"/>
+  </out>
+</xsl:template>
+
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0404.xsl	Fri Aug 08 14:36:24 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping=" 1 " in xsl:value-of -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping=" 1 "/>
+  </out>
+</xsl:template>
+
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0405.xsl	Fri Aug 08 14:36:24 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="2.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping=" no " in xsl:value-of -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping=" no "/>
+  </out>
+</xsl:template>
+
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0406.xsl	Fri Aug 08 14:36:24 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="false" in xsl:value-of -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping="false"/>
+  </out>
+</xsl:template>
+
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0407.xsl	Fri Aug 08 14:36:24 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="0" in xsl:value-of -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping="0"/>
+  </out>
+</xsl:template>
+
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/output/output-0408.xsl	Fri Aug 08 14:36:24 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> 
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="3.0">
+  <xsl:output method="xhtml" encoding="UTF-8" indent="no"/>
+
+  <!-- Purpose: Test for disabling-output-escaping="YES" (not allowed) in xsl:value-of -->
+
+<xsl:template match="/">
+  <out>
+    <xsl:value-of select="doc/foo" disable-output-escaping="YES"/>
+  </out>
+</xsl:template>
+
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/fn/key/key-086.xsl	Fri Aug 08 14:36:24 2014 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- Purpose: Test for xsl:key, with 'composite' attribute. -->
+
+  <xsl:key name="mykey1" match="div" use="title,p" composite="yes"/>  
+
+  <xsl:template match="doc">
+    <out>
+      <xsl:value-of select="key('mykey1',('Expressions','Exp Section') )/q"/>      
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>