Add a (placeholder) test for xsl:stream/xsl:fork/xsl:for-each-group
authorMichael Kay <mike@saxonica.com>
Fri, 10 Jul 2015 00:00:37 +0100
changeset 1016 e6dbb71e09d2
parent 1015 b7ec635012c5
child 1017 69b2e75c9ba5
Add a (placeholder) test for xsl:stream/xsl:fork/xsl:for-each-group
tests/strm/si-fork/_si-fork-test-set.xml
tests/strm/si-fork/si-fork-B.xsl
--- a/tests/strm/si-fork/_si-fork-test-set.xml	Thu Jul 09 23:10:39 2015 +0100
+++ b/tests/strm/si-fork/_si-fork-test-set.xml	Fri Jul 10 00:00:37 2015 +0100
@@ -6,6 +6,10 @@
      <stylesheet file="si-fork-A.xsl"/>
    </environment>
    
+   <environment name="si-fork-B">
+     <stylesheet file="si-fork-B.xsl"/>
+   </environment>
+   
    <dependencies>
       <spec value="XSLT30+"/>
       <feature value="streaming"/>
@@ -153,6 +157,18 @@
       </result>
    </test-case>
    
+   <test-case name="si-fork-101">
+      <description>xsl:stream instruction with xsl:fork with xsl:for-each-group</description>
+      <created by="Michael Kay" on="2015-07-09"/>
+      <environment ref="si-fork-B"/>
+      <test>
+         <initial-template name="g-001"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>TBA</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
    <test-case name="si-fork-901">
       <description>Non-streamable xsl:fork - returns streamed nodes</description>
       <keywords>multiple-xsl-sequence-children AxisStep striding XTSE3430 illegally-returning-streamed-nodes</keywords>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/strm/si-fork/si-fork-B.xsl	Fri Jul 10 00:00:37 2015 +0100
@@ -0,0 +1,28 @@
+<xsl:transform version="3.0" 
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:map="http://www.w3.org/2005/xpath-functions/map"
+    xmlns:err="http://www.w3.org/2005/xqt-errors"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="map xs err">
+    
+    <xsl:variable name="RUN" select="true()" static="yes"/>
+    <xsl:strip-space elements="*"/>
+      
+   
+  <!-- within xsl:stream, use xsl:fork/xsl:for-each-group -->
+  
+  <xsl:template name="g-001" use-when="$RUN">
+    <out>
+      <xsl:stream href="../docs/books.xml">
+        <xsl:fork>
+          <xsl:for-each-group select="/BOOKLIST/BOOKS/ITEM" group-by="@CAT">
+            <xsl:copy-of select="current-group()"/>
+          </xsl:for-each-group>
+        </xsl:fork>   
+      </xsl:stream>
+    </out>
+  </xsl:template>
+  
+
+  
+</xsl:transform>  
\ No newline at end of file