Streaming tests for fn:current()
authorMichael Kay <mike@saxonica.com>
Fri, 24 Jul 2015 15:47:48 +0100
changeset 1022 90a7bb69fb87
parent 1021 5eb9b363af2e
child 1023 2156a3dcec57
Streaming tests for fn:current()
tests/strm/sf-current/_sf-current-test-set.xml
tests/strm/sf-current/sf-current-A.xsl
--- a/tests/strm/sf-current/_sf-current-test-set.xml	Wed Jul 15 15:54:41 2015 +0100
+++ b/tests/strm/sf-current/_sf-current-test-set.xml	Fri Jul 24 15:47:48 2015 +0100
@@ -19,7 +19,13 @@
          <initial-template name="c-001"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out>TBA</out>]]></assert-xml>
+         <assert-xml><![CDATA[<out><TITLE>Pride and Prejudice</TITLE
+         ><AUTHOR>Jane Austen</AUTHOR><PUBLISHER>Modern Library</PUBLISHER
+         ><PUB-DATE>2002-12-31</PUB-DATE><LANGUAGE>English</LANGUAGE
+         ><PRICE>4.95</PRICE><QUANTITY>187</QUANTITY
+         ><ISBN>0679601686</ISBN><PAGES>352</PAGES
+         ><DIMENSIONS UNIT="in">8.3 5.7 1.1</DIMENSIONS><WEIGHT UNIT="oz">6.1</WEIGHT
+         ></out>]]></assert-xml>
       </result>
    </test-case>
 
@@ -31,7 +37,13 @@
          <initial-template name="c-002"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out>TBA</out>]]></assert-xml>
+         <assert-xml><![CDATA[<out><TITLE>Pride and Prejudice</TITLE
+         ><AUTHOR>Jane Austen</AUTHOR><PUBLISHER>Modern Library</PUBLISHER
+         ><PUB-DATE>2002-12-31</PUB-DATE><LANGUAGE>English</LANGUAGE
+         ><PRICE>4.95</PRICE><QUANTITY>187</QUANTITY
+         ><ISBN>0679601686</ISBN><PAGES>352</PAGES
+         ><DIMENSIONS UNIT="in">8.3 5.7 1.1</DIMENSIONS><WEIGHT UNIT="oz">6.1</WEIGHT
+         ></out>]]></assert-xml>
       </result>
    </test-case>
    
@@ -87,7 +99,7 @@
    </test-case>
 
  
-   <test-case name="sf-empty-901">
+   <test-case name="sf-current-901">
       <description>Test of xsl:stream instruction current(), not streamable.</description>
       <created by="Michael Kay" on="2015-07-09"/>
       <test>
--- a/tests/strm/sf-current/sf-current-A.xsl	Wed Jul 15 15:54:41 2015 +0100
+++ b/tests/strm/sf-current/sf-current-A.xsl	Fri Jul 24 15:47:48 2015 +0100
@@ -13,7 +13,7 @@
       <xsl:stream href="../docs/books.xml">
         <out>
           <xsl:for-each select="head(/BOOKLIST/BOOKS/ITEM)">
-            <a><xsl:copy-of select="*[namespace-uri(.) = namespace-uri(current())]"/></a>
+            <xsl:copy-of select="*[namespace-uri(.) = namespace-uri(current())]"/>
           </xsl:for-each>  
         </out>
       </xsl:stream>