Bug 28414, default-validation=preserve does not raise error in 3.0 anymore
authorabraaksm
Tue, 07 Apr 2015 03:50:51 +0200
changeset 920 dc38e5bfb780
parent 919 e59c1d1a0e6c
child 921 f94875629f10
Bug 28414, default-validation=preserve does not raise error in 3.0 anymore
tests/attr/validation/_validation-test-set.xml
tests/attr/validation/validation-0106.xsl
--- a/tests/attr/validation/_validation-test-set.xml	Tue Apr 07 03:48:00 2015 +0200
+++ b/tests/attr/validation/_validation-test-set.xml	Tue Apr 07 03:50:51 2015 +0200
@@ -249,13 +249,15 @@
 
    <test-case name="validation-0106">
       <description>
+         XSLT20 only:
       	Test that an error is raised if @default-validation=preserve is present in the 
       	stylesheet but the processor is a non-schema-aware processor.
       </description>
       <created by="Michael Kay" on="2012-10-30"/>
+      <modified by="Abel Braaksma" on="2015-04-06" change="Bug 28414, split into a 2.0 and 3.0 version"/>
       <environment ref="validation-01"/>
       <dependencies>
-         <spec value="XSLT20+"/>
+         <spec value="XSLT20"/>
          <feature value="schema_aware" satisfied="false"/>
       </dependencies>
       <test>
@@ -266,6 +268,27 @@
       </result>
    </test-case>
    
+   <test-case name="validation-0106a">
+      <description>
+         XSLT30+ only:
+      	Test that an error is NOT raised if @default-validation=preserve is present in the 
+      	stylesheet but the processor is a non-schema-aware processor.
+      	See bug 28414.
+      </description>
+      <created by="Abel Braaksma" on="2015-04-05"/>
+      <environment ref="validation-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+         <feature value="schema_aware" satisfied="false"/>
+      </dependencies>
+      <test>
+         <stylesheet file="validation-0106.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<elem>2.2</elem>]]></assert-xml>
+      </result>
+   </test-case>
+   
    <test-case name="validation-0107">
       <description>
       	Test validation with type="xs:untyped". Bugzilla 17480.
--- a/tests/attr/validation/validation-0106.xsl	Tue Apr 07 03:48:00 2015 +0200
+++ b/tests/attr/validation/validation-0106.xsl	Tue Apr 07 03:50:51 2015 +0200
@@ -5,7 +5,7 @@
 <!-- Purpose: Test that an error is raised if @default-validation=preserve is present in 
   				the stylesheet but the processor is a basic processor.-->
 
-   <t:template match="/doc">
+   <t:template match="/">
       <t:element name="elem">2.2</t:element>
    </t:template>
 </t:transform>