New tests for @streamable (spec change 26308)
authordebbie
Thu, 14 Aug 2014 15:29:13 +0100
changeset 614 3958edb74eba
parent 613 3041f3ed5957
child 615 d45896759bce
New tests for @streamable (spec change 26308)
tests/decl/accumulator/_accumulator-test-set.xml
tests/decl/accumulator/accumulator-037.xsl
tests/decl/attribute-set/_attribute-set-test-set.xml
tests/decl/attribute-set/attribute-set-0104.xsl
tests/decl/attribute-set/attribute-set-0105.xsl
tests/insn/merge/_merge-test-set.xml
tests/insn/merge/merge-062.xsl
tests/insn/merge/merge-063.xsl
tests/insn/merge/merge-064.xsl
tests/strm/si-LRE/_si-lre-test-set.xml
tests/strm/si-LRE/si-lre-904.xsl
tests/strm/si-LRE/si-lre-905.xsl
tests/strm/si-LRE/si-lre-906.xsl
tests/strm/si-LRE/si-lre-A.xsl
tests/strm/si-merge/_si-merge-test-set.xml
tests/strm/si-merge/si-merge-005.xsl
--- a/tests/decl/accumulator/_accumulator-test-set.xml	Wed Aug 13 17:33:25 2014 +0100
+++ b/tests/decl/accumulator/_accumulator-test-set.xml	Thu Aug 14 15:29:13 2014 +0100
@@ -67,10 +67,11 @@
       <description>Pre-descent accumulator functions called before and after</description>
       <keywords>xsl:mode on-no-match-attribute shallow-skip fn:accumulator-before</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-14" change="use streamable='false'"/>
       <environment ref="accumulator-002"/>
       <test>
          <stylesheet file="accumulator-003.xsl"/>
-         <param name="streamable" static="yes" select="'no'"/>
+         <param name="streamable" static="yes" select="'false'"/>
       </test>
       <result>
          <assert-xml><![CDATA[<figures><pix><p>Figure 1 start</p><p>Figure 1 end</p></pix
@@ -84,13 +85,14 @@
       <description>Pre-descent accumulator functions called before and after - streaming</description>
       <keywords>xsl:mode on-no-match-attribute shallow-skip fn:accumulator-before streamable</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-14" change="use streamable=' true '"/>
       <environment ref="accumulator-002s"/>
       <dependencies>
          <feature value="streaming"/>
       </dependencies>
       <test>
          <stylesheet file="accumulator-003.xsl"/>
-         <param name="streamable" static="yes" select="'yes'"/>
+         <param name="streamable" static="yes" select="' true '"/>
       </test>
       <result>
          <assert-xml><![CDATA[<figures><pix><p>Figure 1 start</p><p>Figure 1 end</p></pix
@@ -104,10 +106,11 @@
       <description>Pre-descent and post-descent accumulator functions</description>
       <keywords>xsl:mode on-no-match-attribute shallow-skip fn:accumulator-before fn:accumulator-after</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-14" change="use streamable='0'"/>
       <environment ref="accumulator-002"/>
       <test>
          <stylesheet file="accumulator-005.xsl"/>
-         <param name="streamable" static="yes" select="'no'"/>
+         <param name="streamable" static="yes" select="'0'"/>
       </test>
       <result>
          <assert-xml><![CDATA[<figures><pix><p>Figure 1 start</p><p>Figure 1.5 end</p></pix
@@ -121,13 +124,14 @@
       <description>Pre-descent and post-descent accumulator functions - streaming</description>
       <keywords>xsl:mode on-no-match-attribute shallow-skip fn:accumulator-before fn:accumulator-after streamable</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Debbie Lockett" on="2014-08-14" change="use streamable='1'"/>
       <environment ref="accumulator-002s"/>
       <dependencies>
          <feature value="streaming"/>
       </dependencies>
       <test>
          <stylesheet file="accumulator-005.xsl"/>
-         <param name="streamable" static="yes" select="'yes'"/>
+         <param name="streamable" static="yes" select="'1'"/>
       </test>
       <result>
          <assert-xml><![CDATA[<figures><pix><p>Figure 1 start</p><p>Figure 1.5 end</p></pix
@@ -654,8 +658,20 @@
          <assert>/Total-Cost = '91'</assert><!-- needs revision -->
       </result>
    </test-case>
-
-
+   
+   <test-case name="accumulator-037">
+      <description>Basic test of accumulator functions with streamable="No" (not allowed)</description>
+      <keywords>xsl:mode on-no-match-attribute shallow-skip fn:accumulator-before ElementTest</keywords>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="accumulator-001"/>
+      <test>
+         <stylesheet file="accumulator-037.xsl"/>
+         <param name="streamable" static="yes" select="'No'"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
 
 
 </test-set>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/accumulator/accumulator-037.xsl	Thu Aug 14 15:29:13 2014 +0100
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:f="http://accum001/"
+  exclude-result-prefixes="xs f" version="3.0">
+
+  <!-- Simple test of an accumulator function with streamable="No" (not allowed) -->
+  
+  <xsl:param name="streamable" static="yes" select="'No'"/>
+
+  <xsl:accumulator name="figNr" as="xs:integer" initial-value="0" _streamable="{$streamable}">
+    <xsl:accumulator-rule match="chap" select="0"/>
+    <xsl:accumulator-rule match="fig" select="$value + 1"/>
+  </xsl:accumulator>
+
+  <xsl:mode _streamable="{$streamable}" on-no-match="shallow-skip"/>
+  
+  <xsl:template match="fig">
+    <xsl:apply-templates/>
+    <p>Figure <xsl:value-of select="accumulator-before('figNr')"/>: <xsl:value-of select="@alt"/></p>
+  </xsl:template>
+
+  <xsl:template match="/">
+    <figures>
+      <xsl:apply-templates/>
+    </figures>
+  </xsl:template>
+</xsl:stylesheet>
--- a/tests/decl/attribute-set/_attribute-set-test-set.xml	Wed Aug 13 17:33:25 2014 +0100
+++ b/tests/decl/attribute-set/_attribute-set-test-set.xml	Thu Aug 14 15:29:13 2014 +0100
@@ -77,6 +77,38 @@
          <assert-xml><![CDATA[<out><test67/></out>]]></assert-xml>
       </result>
    </test-case>
+   
+   <test-case name="attribute-set-0104">
+      <description>Use streamable=" no " on xsl:attribute-set (XSLT 3.0)</description>
+      <keywords>xsl:use-attribute-sets multiple-attribute-sets lre streamable</keywords>
+      <created by="Debbie Lockett" on="2014-08-014"/>
+      <environment ref="attribute-set-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="attribute-set-0104.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><test4 color="black" texture="matt"/></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="attribute-set-0105">
+      <description>Use streamable="false" and "0" on xsl:attribute-set (XSLT 3.0)</description>
+      <keywords>xsl:use-attribute-sets multiple-attribute-sets lre streamable</keywords>
+      <created by="Debbie Lockett" on="2014-08-014"/>
+      <environment ref="attribute-set-01"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="attribute-set-0105.xsl"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><test4 color="black" texture="matt"/></out>]]></assert-xml>
+      </result>
+   </test-case>
 
    <test-case name="attribute-set-0201">
       <description>Set attributes of a LRE from multiple attribute sets.</description>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/attribute-set/attribute-set-0104.xsl	Thu Aug 14 15:29:13 2014 +0100
@@ -0,0 +1,25 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- PURPOSE: Test streamable="no" attribute -->
+  <?spec xslt#attribute-sets?>
+  
+  <xsl:param name="color" select="'black'"/>
+  <xsl:param name="texture" select="'matt'"/>
+
+  <xsl:attribute-set name="set1" streamable=" no ">
+    <xsl:attribute name="color" select="$color"/>
+  </xsl:attribute-set>
+  
+  <xsl:attribute-set name="set2" streamable="no">
+    <xsl:attribute name="texture" select="$texture"/>
+  </xsl:attribute-set>
+
+  <xsl:template match="/">
+    <out>
+      <test4 xsl:use-attribute-sets="set1 set2"></test4>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/attribute-set/attribute-set-0105.xsl	Thu Aug 14 15:29:13 2014 +0100
@@ -0,0 +1,25 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+  <!-- PURPOSE: Test streamable="false" and "0" attribute -->
+  <?spec xslt#attribute-sets?>
+  
+  <xsl:param name="color" select="'black'"/>
+  <xsl:param name="texture" select="'matt'"/>
+
+  <xsl:attribute-set name="set1" streamable="false">
+    <xsl:attribute name="color" select="$color"/>
+  </xsl:attribute-set>
+  
+  <xsl:attribute-set name="set2" streamable="0">
+    <xsl:attribute name="texture" select="$texture"/>
+  </xsl:attribute-set>
+
+  <xsl:template match="/">
+    <out>
+      <test4 xsl:use-attribute-sets="set1 set2"></test4>
+    </out>
+  </xsl:template>
+
+</xsl:stylesheet>
--- a/tests/insn/merge/_merge-test-set.xml	Wed Aug 13 17:33:25 2014 +0100
+++ b/tests/insn/merge/_merge-test-set.xml	Thu Aug 14 15:29:13 2014 +0100
@@ -940,5 +940,44 @@
          <assert-xml file="merge-018.out"/>
       </result>
    </test-case>
+   
+   <test-case name="merge-062">
+      <description>xsl:merge test on two heterogeneous files, using for-each-stream and streamable=" no ".</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="merge002"/>
+      <dependencies/>
+      <test>
+         <stylesheet file="merge-062.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="merge-002.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="merge-063">
+      <description>xsl:merge test on two heterogeneous files, using for-each-stream, and streamable="false" and "0".</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="merge002"/>
+      <dependencies/>
+      <test>
+         <stylesheet file="merge-063.xsl"/>
+      </test>
+      <result>
+         <assert-xml file="merge-002.out"/>
+      </result>
+   </test-case>
+   
+   <test-case name="merge-064">
+      <description>xsl:merge test on two heterogeneous files, using for-each-stream and streamable="No" (not allowed).</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <environment ref="merge002"/>
+      <dependencies/>
+      <test>
+         <stylesheet file="merge-064.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>
 
 </test-set>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/merge/merge-062.xsl	Thu Aug 14 15:29:13 2014 +0100
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="xs"
+    version="3.0">
+    <!-- xsl:merge test on two heterogeneous files, using for-each-stream and streamable=" no ". -->
+    
+    <xsl:output method="xml" indent="no"/>
+    <xsl:strip-space elements="*"/>
+    <xsl:template match="/">
+        
+        <events>
+            <xsl:merge>
+                <xsl:merge-source for-each-stream="'log-file-1.xml'" select="events/event" streamable=" no ">
+                        <xsl:merge-key select="xs:dateTime(@timestamp)"/>
+                </xsl:merge-source>
+                <xsl:merge-source for-each-stream="'log-file-2.xml'" select="log/day/record" streamable="no">
+                        <xsl:merge-key select="dateTime(../@date, time)"/>
+                </xsl:merge-source>
+                <xsl:merge-action>
+                    <group>
+                        <xsl:copy-of select="current-merge-group()" />
+                    </group>
+                </xsl:merge-action>
+            </xsl:merge>
+        </events>
+        
+    </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/merge/merge-063.xsl	Thu Aug 14 15:29:13 2014 +0100
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="xs"
+    version="3.0">
+    <!-- xsl:merge test on two heterogeneous files, using for-each-stream, and streamable="false" and "0". -->
+    
+    <xsl:output method="xml" indent="no"/>
+    <xsl:strip-space elements="*"/>
+    <xsl:template match="/">
+        
+        <events>
+            <xsl:merge>
+                <xsl:merge-source for-each-stream="'log-file-1.xml'" select="events/event" streamable="false">
+                        <xsl:merge-key select="xs:dateTime(@timestamp)"/>
+                </xsl:merge-source>
+                <xsl:merge-source for-each-stream="'log-file-2.xml'" select="log/day/record" streamable="0">
+                        <xsl:merge-key select="dateTime(../@date, time)"/>
+                </xsl:merge-source>
+                <xsl:merge-action>
+                    <group>
+                        <xsl:copy-of select="current-merge-group()" />
+                    </group>
+                </xsl:merge-action>
+            </xsl:merge>
+        </events>
+        
+    </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/merge/merge-064.xsl	Thu Aug 14 15:29:13 2014 +0100
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="xs"
+    version="3.0">
+    <!-- xsl:merge test on two heterogeneous files, using for-each-stream, and streamable="No" (not allowed). -->
+    
+    <xsl:output method="xml" indent="no"/>
+    <xsl:strip-space elements="*"/>
+    <xsl:template match="/">
+        
+        <events>
+            <xsl:merge>
+                <xsl:merge-source for-each-stream="'log-file-1.xml'" select="events/event" streamable="No">
+                        <xsl:merge-key select="xs:dateTime(@timestamp)"/>
+                </xsl:merge-source>
+                <xsl:merge-source for-each-stream="'log-file-2.xml'" select="log/day/record" streamable="no">
+                        <xsl:merge-key select="dateTime(../@date, time)"/>
+                </xsl:merge-source>
+                <xsl:merge-action>
+                    <group>
+                        <xsl:copy-of select="current-merge-group()" />
+                    </group>
+                </xsl:merge-action>
+            </xsl:merge>
+        </events>
+        
+    </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- a/tests/strm/si-LRE/_si-lre-test-set.xml	Wed Aug 13 17:33:25 2014 +0100
+++ b/tests/strm/si-LRE/_si-lre-test-set.xml	Thu Aug 14 15:29:13 2014 +0100
@@ -344,7 +344,7 @@
       <result>
          <assert>/out/a</assert>
       </result>
-   </test-case>
+   </test-case> 
    
    <test-case name="si-lre-101">
       <description>Use literal result element: schema-aware, validation=strict</description>
@@ -1157,7 +1157,42 @@
          <error code="XTSE3430"/>
       </result>
    </test-case>
-  
-  
+   
+   <test-case name="si-lre-904">
+      <description>Use literal result element: uses a streamable attribute set with streamable=" true "</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <test>
+         <stylesheet file="si-lre-904.xsl"/>
+         <initial-template name="cy-904"/>
+      </test>
+      <result>
+         <assert>/out/*[@x='1' and @y='2']</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="si-lre-905">
+      <description>Use literal result element: uses a streamable attribute set with streamable="1"</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <test>
+         <stylesheet file="si-lre-905.xsl"/>
+         <initial-template name="cy-905"/>
+      </test>
+      <result>
+         <assert>/out/*[@x='1' and @y='2']</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="si-lre-906">
+      <description>Use literal result element, using an attribute set with streamable="Yes" (not allowed)</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <test>
+         <stylesheet file="si-lre-906.xsl"/>
+         <initial-template name="cy-906"/>
+      </test>
+      <result>
+         <error code="XTSE0020"/>
+      </result>
+   </test-case>     
+    
    
 </test-set>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/strm/si-LRE/si-lre-904.xsl	Thu Aug 14 15:29:13 2014 +0100
@@ -0,0 +1,29 @@
+<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:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="map xs">
+    
+    <xsl:variable name="RUN" select="true()" static="yes"/>
+    <xsl:strip-space elements="*"/>
+   
+  <!-- LRE referring to a streamable attribute set with streamable=" true " -->
+  
+  <xsl:attribute-set name="as-5" streamable=" true ">
+    <xsl:attribute name="x" select="1"/>
+    <xsl:attribute name="y" select="2"/>
+  </xsl:attribute-set> 
+  
+  <xsl:template name="cy-904" use-when="$RUN">
+    <out>
+      <xsl:stream href="../docs/citygml.xml">
+        <xsl:for-each select="*">
+          <dddd xsl:use-attribute-sets="as-5">
+            <xsl:sequence select="*" />
+          </dddd>
+        </xsl:for-each>  
+      </xsl:stream>
+    </out>
+  </xsl:template>
+  
+</xsl:transform>  
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/strm/si-LRE/si-lre-905.xsl	Thu Aug 14 15:29:13 2014 +0100
@@ -0,0 +1,29 @@
+<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:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="map xs">
+    
+    <xsl:variable name="RUN" select="true()" static="yes"/>
+    <xsl:strip-space elements="*"/>
+   
+  <!-- LRE referring to a streamable attribute set with streamable="1" -->
+  
+  <xsl:attribute-set name="as-6" streamable="1">
+    <xsl:attribute name="x" select="1"/>
+    <xsl:attribute name="y" select="2"/>
+  </xsl:attribute-set> 
+  
+  <xsl:template name="cy-905" use-when="$RUN">
+    <out>
+      <xsl:stream href="../docs/citygml.xml">
+        <xsl:for-each select="*">
+          <dddd xsl:use-attribute-sets="as-6">
+            <xsl:sequence select="*" />
+          </dddd>
+        </xsl:for-each>  
+      </xsl:stream>
+    </out>
+  </xsl:template>
+  
+</xsl:transform>  
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/strm/si-LRE/si-lre-906.xsl	Thu Aug 14 15:29:13 2014 +0100
@@ -0,0 +1,26 @@
+<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:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="map xs">
+    
+    <xsl:variable name="RUN" select="true()" static="yes"/>
+    <xsl:strip-space elements="*"/>
+   
+
+  <!-- LRE referring to an attribute set with streamable="Yes" (not allowed) -->
+  
+  <xsl:attribute-set name="as-4" streamable="Yes">
+    <xsl:attribute name="x" select="1"/>
+    <xsl:attribute name="y" select="2"/>
+  </xsl:attribute-set> 
+   
+  <xsl:template name="cy-906" use-when="$RUN">
+    <out>
+      <xsl:stream href="../docs/citygml.xml">
+        <e xsl:use-attribute-sets="as-4"/>
+      </xsl:stream>
+    </out>
+  </xsl:template>  
+  
+</xsl:transform>  
\ No newline at end of file
--- a/tests/strm/si-LRE/si-lre-A.xsl	Wed Aug 13 17:33:25 2014 +0100
+++ b/tests/strm/si-LRE/si-lre-A.xsl	Thu Aug 14 15:29:13 2014 +0100
@@ -384,8 +384,7 @@
         </xsl:for-each>  
       </xsl:stream>
     </out>
-  </xsl:template>
-  
+  </xsl:template>  
    
   
 </xsl:transform>  
\ No newline at end of file
--- a/tests/strm/si-merge/_si-merge-test-set.xml	Wed Aug 13 17:33:25 2014 +0100
+++ b/tests/strm/si-merge/_si-merge-test-set.xml	Thu Aug 14 15:29:13 2014 +0100
@@ -69,6 +69,22 @@
          <assert>count(/prices/key) = 11644</assert>
       </result>
    </test-case>
+   
+   <test-case name="si-merge-005">
+      <description>Test streamable=" true " and " 1 "; merge time-series data for gold and uranium prices.</description>
+      <created by="Debbie Lockett" on="2014-08-14"/>
+      <test>
+         <stylesheet file="si-merge-005.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <all-of>
+            <assert>/prices/price[@date="2014-03-31"][@gold="1294.0"][@uranium="34.91"]</assert>
+            <assert>/prices/price[@date="2014-02-28"][@gold="1327.75"][@uranium="35.54"]</assert>
+            <assert>/prices/price[@date="2014-01-31"][@gold="1246.5"][@uranium="35.1"]</assert>
+         </all-of>
+      </result>
+   </test-case>
 
    
 </test-set>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/strm/si-merge/si-merge-005.xsl	Thu Aug 14 15:29:13 2014 +0100
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="xs"
+    version="3.0">
+    
+    <!-- Purpose: Test streamable=" true " and " 1 "; merge time-series data for gold and uranium prices. -->
+
+    <xsl:template name="main">
+        
+        <prices>
+            <xsl:merge>
+                <xsl:merge-source
+                    name="gold"
+                    streamable=" true "
+                    for-each-stream="'../docs/goldPrice.xml'" 
+                	select="dataset/data/datum">
+                        <xsl:merge-key select="xs:date(datum[1])" order="descending"/>
+                </xsl:merge-source>
+                <xsl:merge-source
+                    name="uranium" 
+                	streamable=" 1 "
+                    for-each-stream="'../docs/uraniumPrice.xml'" 
+                	select="dataset/data/datum">
+                        <xsl:merge-key select="xs:date(datum[1])" order="descending"/>
+                </xsl:merge-source>
+                <xsl:merge-action>
+                    <xsl:if test="count(current-merge-group()) = 2">
+                       <price date="{current-merge-key()}"
+                              gold="{current-merge-group('gold')/datum[2]}"
+                              uranium="{current-merge-group('uranium')/datum[2]}"/>
+                    </xsl:if>
+                </xsl:merge-action>
+            </xsl:merge>
+        </prices>
+        
+    </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file