New test case for global-context-item, see bug 30173
authorMichael Kay <mike@saxonica.com>
Wed, 30 Aug 2017 11:10:24 +0100
changeset 1753 11ea335f61ab
parent 1752 b8594537eaed
child 1754 49040b3db77c
child 1755 734cb9e04b55
New test case for global-context-item, see bug 30173
tests/decl/global-context-item/_global-context-item-test-set.xml
tests/decl/global-context-item/glob-cxt-item-012.xsl
--- a/tests/decl/global-context-item/_global-context-item-test-set.xml	Tue Aug 29 21:36:47 2017 +0100
+++ b/tests/decl/global-context-item/_global-context-item-test-set.xml	Wed Aug 30 11:10:24 2017 +0100
@@ -159,6 +159,17 @@
       </result>
    </test-case>
    
+   <test-case name="glob-cxt-item-012">
+      <description>Test xsl:global-context-item with use="required", and no global context item supplied.</description>
+      <created by="Michael Kay" on="2017-08-30"/>
+      <test>
+         <stylesheet file="glob-cxt-item-012.xsl" role="principal"/>
+      </test>
+      <result>
+         <error code="XTDE3086"/> <!-- Error code from bug 30173 -->
+      </result>
+   </test-case>
+   
    
 
 </test-set>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/global-context-item/glob-cxt-item-012.xsl	Wed Aug 30 11:10:24 2017 +0100
@@ -0,0 +1,11 @@
+<xsl:stylesheet
+  version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
+
+    <xsl:global-context-item use="required"/>
+
+    <xsl:template name="xsl:initial-template">
+      <out/>
+    </xsl:template> 
+  
+  </xsl:stylesheet>
\ No newline at end of file