Add test for default-validation attribute, error case
authorMichael Kay <mike@saxonica.com>
Mon, 02 Feb 2015 16:53:32 +0000
changeset 819 ac439cebdd50
parent 818 b3f51206e8f4
child 820 4c027872f426
Add test for default-validation attribute, error case
tests/attr/validation/_validation-test-set.xml
tests/attr/validation/validation-0110.xsl
--- a/tests/attr/validation/_validation-test-set.xml	Mon Feb 02 16:52:20 2015 +0000
+++ b/tests/attr/validation/_validation-test-set.xml	Mon Feb 02 16:53:32 2015 +0000
@@ -333,6 +333,24 @@
          <error code="XTTE1540"/>
       </result>
    </test-case>
+   
+   <test-case name="validation-0110">
+      <description>
+      	Test that an error is raised if @default-validation=strict is present on xsl:stylesheet.
+      </description>
+      <created by="Michael Kay" on="2015-02-02"/>
+      <environment ref="validation-01"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+         <feature value="schema_aware" satisfied="true"/>
+      </dependencies>
+      <test>
+         <stylesheet file="validation-0110.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
 
    <test-case name="validation-0201">
       <description>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/validation/validation-0110.xsl	Mon Feb 02 16:53:32 2015 +0000
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<t:transform xmlns:t="http://www.w3.org/1999/XSL/Transform" version="2.0"
+  default-validation="strict">
+<!-- Purpose: Test that an error is raised if @default-validation=strict is present.-->
+
+   <t:template match="/doc">
+      <t:element name="elem">2.2</t:element>
+   </t:template>
+</t:transform>