New test case for a stream-available condition
authorMichael Kay <mike@saxonica.com>
Tue, 11 Aug 2015 17:59:53 +0100
changeset 1027 ab952335df2b
parent 1026 238fd578d417
child 1028 b36832309a6d
New test case for a stream-available condition
tests/fn/stream-available/_stream-available-test-set.xml
tests/fn/stream-available/dtd-only.xml
--- a/tests/fn/stream-available/_stream-available-test-set.xml	Tue Aug 11 17:59:12 2015 +0100
+++ b/tests/fn/stream-available/_stream-available-test-set.xml	Tue Aug 11 17:59:53 2015 +0100
@@ -76,6 +76,20 @@
          <assert>/out = "true"</assert>
       </result>
    </test-case>
+   
+   <test-case name="stream-available-006">
+      <description>Returns false, file exists and consists entirely of DTD, with an unresolved reference in the DTD</description>
+      <created by="Michael Kay" on="2015-08-04"/>
+      <environment ref="stream-available-A"/>            
+      <test>
+         <param name="uri" select="'dtd-only.xml'"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <assert>/out = "false"</assert>
+      </result>
+   </test-case>
+
 
 
 </test-set>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/fn/stream-available/dtd-only.xml	Tue Aug 11 17:59:53 2015 +0100
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<!DOCTYPE doc [
+<!-- XML Spec 2.2 modified for XSLT 2.0 -->
+
+<!-- add the "at" attribute to indicate when a change was last made to an element -->
+
+<!ENTITY % diff.att
+        'diff                   (chg
+                                |add
+                                |del
+                                |off)           #IMPLIED
+         at                     CDATA           #IMPLIED'>
+
+<!ENTITY % local.p.class  "|change">
+<!ENTITY % local.illus.class "|e:element-syntax|t:tree|g:graph|imp-def-feature|requirements|error.extra|error.action">
+<!ATTLIST spec
+  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
+  xmlns:t CDATA #FIXED "http://www.w3.org/2008/XSL/Spec/TreeDiagram"
+  xmlns:g CDATA	#FIXED "http://www.martin-loetzsch.de/DOTML"
+>
+
+<!ENTITY % local.tech.class "|errorref|xerrorref|elcode|error|xfunction">
+
+<!--<!ENTITY % issue.element "IGNORE">-->
+<!ENTITY % code.element "IGNORE">
+
+<!ENTITY % local.proto.att "
+         class                 NMTOKEN   #REQUIRED
+         returnSeq             (yes|no)  #IMPLIED
+         returnEmptyOk         (yes|no)  #IMPLIED">
+
+<!ENTITY % local.arg.att "
+         name                  NMTOKEN   #REQUIRED
+         seq                   (yes|no)  #IMPLIED
+         emptyOk               (yes|no)  #IMPLIED">
+
+<!ENTITY % argtypes 'CDATA'>
+
+<!ENTITY % loc.attlist "IGNORE">
+
+<!ENTITY % xsl-query-spec SYSTEM "../../../schema/xsl-query.dtd">
+%xsl-query-spec;
+
+<!-- allow rel on loc -->
+<!ATTLIST loc
+	rel CDATA #IMPLIED
+        %common.att;
+        %simple-xlink.att;
+        %href-req.att;
+        %user-replace.att;>
+
+<!-- A 'change' element surrounds a sequence of paragraphs with common diff/at attributes -->
+
+<!ELEMENT change (%div.mix;)*>
+<!ATTLIST change %common.att;>
+
+<!-- Allow a 'code' element to contain a 'var' element for italicised code -->
+
+<!ELEMENT code (%tech.pcd.mix;|var)*>
+
+<!-- The 'elcode' element is used for all references to XSLT elements (e.g. xsl:param, xsl:choose) -->
+
+<!ELEMENT elcode (#PCDATA)>
+
+<!-- The 'xfunction' element is used for references to XPath function names -->
+
+<!ELEMENT xfunction (#PCDATA)>
+
+
+<!-- Content model for markup to indicate error conditions -->
+
+<!ELEMENT error.extra (%p.pcd.mix;)* >
+<!ELEMENT error.action (%p.pcd.mix;)* >
+
+
+
+
+<!-- End of XML Spec 2.2 modified for XSLT 2.0 -->
+]>
\ No newline at end of file