Add tests for non-streaming outermost() function
authorMichael Kay <mike@saxonica.com>
Mon, 25 Jan 2016 13:17:40 +0000
changeset 1215 077077057502
parent 1214 7fd567cafa00
child 1216 2d8a1f165877
Add tests for non-streaming outermost() function
catalog.xml
tests/fn/outermost/_outermost-test-set.xml
tests/fn/outermost/outermost-A.xsl
--- a/catalog.xml	Mon Jan 25 10:29:14 2016 +0000
+++ b/catalog.xml	Mon Jan 25 13:17:40 2016 +0000
@@ -81,7 +81,8 @@
       <test-set name="id" file="tests/fn/id/_id-test-set.xml"/>
       <test-set name="json-to-xml" file="tests/fn/json-to-xml/_json-to-xml-test-set.xml"/>
       <test-set name="key" file="tests/fn/key/_key-test-set.xml"/>
-      <test-set name="normalize-unicode" file="tests/fn/normalize-unicode/_normalize-unicode-test-set.xml"/>         
+      <test-set name="normalize-unicode" file="tests/fn/normalize-unicode/_normalize-unicode-test-set.xml"/> 
+      <test-set name="outermost" file="tests/fn/outermost/_outermost-test-set.xml"/>
       <test-set name="position" file="tests/fn/position/_position-test-set.xml"/>
       <test-set name="resolve-uri" file="tests/fn/resolve-uri/_resolve-uri-test-set.xml"/>         
       <test-set name="root" file="tests/fn/root/_root-test-set.xml"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/fn/outermost/_outermost-test-set.xml	Mon Jan 25 13:17:40 2016 +0000
@@ -0,0 +1,353 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test-set xmlns="http://www.w3.org/2012/10/xslt-test-catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="outermost">
+   <description>outermost() function without streaming</description>
+   
+   <environment name="outermost-A">
+     <stylesheet file="outermost-A.xsl"/>
+   </environment>
+   
+   <dependencies>
+      <spec value="XSLT30+"/>
+   </dependencies>
+   
+   <test-case name="outermost-001">
+      <description>outermost() - grounded operand</description>
+      <keywords>striding-then-grounded leading-lone-slash PathExpr fn:data</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-001"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>4.95 6.58 4.95 4.95 16.47 16.47</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-002">
+      <description>outermost() - grounded operand</description>
+      <keywords>leading-lone-slash striding-then-grounded fn:copy-of PathExpr</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-002"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><PRICE>4.95</PRICE><PRICE>6.58</PRICE><PRICE>4.95</PRICE><PRICE>4.95</PRICE><PRICE>16.47</PRICE><PRICE>16.47</PRICE></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-003">
+      <description>outermost() - grounded atomic operand</description>
+      <keywords>striding-then-grounded leading-lone-slash fn:tokenize ContextItemExpr PathExpr SimpleMapExpr</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-003"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>8.3 5.7 1.1 1.0 5.2 7.8 6.8 4.2 0.8 7.8 5.2 0.9 22.5 18.0 3.5 7.8 5.0 0.9</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-010">
+      <description>outermost() - striding operand, inspection usage</description>
+      <keywords>striding leading-lone-slash PathExpr fn:count</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-010"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>6</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-011">
+      <description>outermost() - striding operand, absorption usage</description>
+      <keywords>striding leading-lone-slash PathExpr fn:sum</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-011"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>54.37</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-012">
+      <description>outermost() - striding operand, transmission usage</description>
+      <keywords>leading-lone-slash striding motionless-predicate fn:position PathExpr</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-012"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>6.58 4.95 16.47</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-013">
+      <description>outermost() - striding operand, focus-setting usage</description>
+      <keywords>AdditiveExpr ContextItemExpr striding leading-lone-slash PathExpr SimpleMapExpr</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-013"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>5.95 7.58 5.95 5.95 17.47 17.47</out>]]></assert-xml>
+      </result>
+   </test-case> 
+   
+   <test-case name="outermost-014">
+      <description>outermost() - striding operand, focus-controlled usage</description>
+      <keywords>leading-lone-slash AxisStep striding PathExpr positional-predicate SimpleMapExpr</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-014"/>
+      </test>
+      <result>
+         <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> 
+   
+   <test-case name="outermost-015">
+      <description>outermost() - striding operand, focus-setting usage</description>
+      <keywords>leading-lone-slash striding PathExpr AdditiveExpr</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-015"/>
+      </test>
+      <result>
+         <assert>/out = "5.95 7.58 5.95 5.95 17.47 17.47 "</assert>
+      </result>
+   </test-case> 
+   
+   <test-case name="outermost-016">
+      <description>outermost() - striding operand, focus-controlled usage</description>
+      <keywords>xsl:for-each striding AxisStep PathExpr positional-predicate leading-lone-slash</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-016"/>
+      </test>
+      <result>
+         <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>
+   
+   <test-case name="outermost-017">
+      <description>outermost() - striding operand, focus-setting usage for inspection action</description>
+      <keywords>leading-lone-slash striding PathExpr positional-predicate SimpleMapExpr fn:name</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-017"/>
+      </test>
+      <result>
+         <assert>/out = "true false true true true true false false true true true"</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-018">
+      <description>outermost() - striding operand, apply-templates usage</description>
+      <keywords>leading-lone-slash striding xsl:apply-templates PathExpr positional-predicate</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-018"/>
+      </test>
+      <result>
+         <assert>/out = "Pride and PrejudiceJane AustenModern Library2002-12-31English4.9518706796016863528.3 5.7 1.16.1"</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-020">
+      <description>outermost() - crawling operand, inspection usage</description>
+      <keywords>xsl:copy-of fn:count crawling-then-striding PathExpr leading-double-slash</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-020"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>6</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-021">
+      <description>outermost() - crawling operand, absorption usage</description>
+      <keywords>leading-lone-slash text-nodes childless-nodes striding-then-crawling fn:count PathExpr positional-predicate</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-021"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>11</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-022">
+      <description>outermost() - crawling operand, transmission usage</description>
+      <keywords>striding-then-crawling leading-lone-slash fn:position PathExpr positional-predicate</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-022"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>Pride and PrejudiceJane AustenModern Library</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-023">
+      <description>outermost() - crawling operand, focus-setting usage</description>
+      <keywords>leading-double-slash childless-nodes text-nodes AdditiveExpr PathExpr crawling SimpleMapExpr crawling-then-striding</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-023"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out>5.95 7.58 5.95 5.95 17.47 17.47</out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-030">
+      <description>outermost() - climbing operand, inspection usage</description>
+      <keywords>striding-then-climbing fn:name leading-lone-slash PathExpr positional-predicate SimpleMapExpr ancestor-axis</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-030"/>
+      </test>
+      <result>
+         <assert>/out = "BOOKLIST"</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-031">
+      <description>outermost() - climbing operand, inspection usage, removal of duplicates</description>
+      <keywords>leading-lone-slash striding-then-climbing fn:name PathExpr SimpleMapExpr ancestor-axis</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-031"/>
+      </test>
+      <result>
+         <assert>/out = "BOOKLIST"</assert>
+      </result>
+   </test-case> 
+   
+   <test-case name="outermost-032">
+      <description>outermost() - climbing operand, absorption usage</description>
+      <keywords>climbing-then-climbing attribute-axis PathExpr positional-predicate ancestor-axis leading-lone-slash</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-032"/>
+      </test>
+      <result>
+         <assert>/out = "MHK|MMP"</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-033">
+      <description>outermost() - climbing operand, absorption usage, removal of duplicates</description>
+      <keywords>climbing-then-climbing leading-lone-slash PathExpr ancestor-or-self-axis climbing</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-033"/>
+      </test>
+      <result>
+         <assert>/out = "MMP|P|P|P|H|P"</assert>
+      </result>
+   </test-case> 
+   
+   <test-case name="outermost-034">
+      <description>outermost() - climbing operand, absorption usage, removal of duplicates</description>
+      <keywords>climbing-then-climbing leading-lone-slash PathExpr ancestor-or-self-axis climbing</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-034"/>
+      </test>
+      <result>
+         <assert>/out = "MMP|P|P|P|H|P"</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-035">
+      <description>outermost() - climbing operand, absorption usage, removal of duplicates</description>
+      <keywords>crawling-then-climbing leading-double-slash attribute-axis PathExpr ancestor-or-self-axis</keywords>
+      <created by="Michael Kay" on="2013-11-25"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-035"/>
+      </test>
+      <result>
+         <assert>/out = "MHK|MMP|P|P|P|H|P"</assert>
+      </result>
+   </test-case> 
+   
+   <test-case name="outermost-100">
+      <description>outermost() - recursive data</description>
+      <keywords>striding-then-climbing attribute-axis leading-double-slash fn:outermost crawling-then-striding PathExpr</keywords>
+      <created by="Michael Kay" on="2013-12-17"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-100"/>
+      </test>
+      <result>
+         <assert>/out = "1"</assert>
+      </result>
+   </test-case> 
+   
+   <test-case name="outermost-101">
+      <description>outermost() - recursive data</description>
+      <keywords>striding-then-climbing attribute-axis leading-double-slash PathExpr fn:outermost crawling-then-striding</keywords>
+      <created by="Michael Kay" on="2013-12-17"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-101"/>
+      </test>
+      <result>
+         <assert>/out = "1.1|1.2|1.3"</assert>
+      </result>
+   </test-case> 
+   
+   <test-case name="outermost-102">
+      <description>outermost() - recursive data</description>
+      <keywords>leading-double-slash PathExpr fn:outermost crawling-then-striding</keywords>
+      <created by="Michael Kay" on="2013-12-17"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-102"/>
+      </test>
+      <result>
+         <assert>/out = "Section 1.1|Section 1.2|Section 1.3"</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="outermost-103">
+      <description>outermost() - recursive data</description>
+      <keywords>leading-double-slash PathExpr fn:outermost crawling-then-striding</keywords>
+      <created by="Michael Kay" on="2013-12-17"/>
+      <environment ref="outermost-A"/>
+      <test>
+         <initial-template name="r-103"/>
+      </test>
+      <result>
+         <assert>/out = "End of Section 1.1|End of Section 1.2|End of Section 1.3"</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/outermost/outermost-A.xsl	Mon Jan 25 13:17:40 2016 +0000
@@ -0,0 +1,277 @@
+<xsl:stylesheet 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="*"/>
+    
+    <!-- Streaming outermost(): grounded operand -->
+    
+    <xsl:template name="r-001" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:value-of select="data(outermost(/BOOKLIST/BOOKS/ITEM/PRICE))"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): grounded operand -->
+    
+    <xsl:template name="r-002" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:copy-of select="outermost(copy-of(/BOOKLIST/BOOKS/ITEM/PRICE))"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): grounded atomic operand -->
+    
+    <xsl:template name="r-003" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:value-of select="outermost(/BOOKLIST/BOOKS/ITEM/DIMENSIONS) ! tokenize(., ' ')"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): striding operand, inspection usage -->
+    
+    <xsl:template name="r-010" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:value-of select="count(outermost(/BOOKLIST/BOOKS/ITEM/PRICE))"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): striding operand, absorption usage -->
+    
+    <xsl:template name="r-011" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:value-of select="sum(outermost(/BOOKLIST/BOOKS/ITEM/PRICE))"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): striding operand, transmission usage -->
+    
+    <xsl:template name="r-012" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:value-of select="outermost(/BOOKLIST/BOOKS/ITEM/PRICE)[position() mod 2 = 0]"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): striding operand, focus-setting usage -->
+    
+    <xsl:template name="r-013" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:value-of select="outermost(/BOOKLIST/BOOKS/ITEM/PRICE) ! (.+1)"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): striding operand, focus-controlled usage -->
+    
+    <!-- Saxon 26 Nov 2013. Failing. A for-each that returns streamed nodes
+         can't currently be handled by a ComposingWatch. Need to generalize
+         TransmissionAdjunct -->
+    
+    <xsl:template name="r-014" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:copy-of select="/BOOKLIST/BOOKS/ITEM[1] ! outermost(*)"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): striding operand, focus-setting usage -->
+    
+    <xsl:template name="r-015" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:for-each select="outermost(/BOOKLIST/BOOKS/ITEM/PRICE)">
+            <xsl:value-of select=".+1 || ' '"/>
+          </xsl:for-each>  
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): striding operand, focus-controlled usage -->
+    
+    <xsl:template name="r-016" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:for-each select="/BOOKLIST/BOOKS/ITEM[1]">
+            <xsl:copy-of select="outermost(*)"/>
+          </xsl:for-each>  
+        </out>
+      </xsl:for-each>
+    </xsl:template>    
+    
+    <!-- Streaming outermost(): striding operand, focus-setting usage for inspection action -->
+    
+    <xsl:template name="r-017" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:value-of select="outermost(/BOOKLIST/BOOKS/ITEM[1]/*) ! contains(name(), 'E')"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): striding operand, apply-templates usage -->
+    
+    <xsl:template name="r-018" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:apply-templates select="outermost(/BOOKLIST/BOOKS/ITEM[1]/*)" mode="r-018-mode"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <xsl:mode name="r-018-mode" streamable="yes" on-no-match="deep-skip"/>
+    <xsl:template match="ITEM/*" mode="r-018-mode"><xsl:value-of select="."/></xsl:template>
+    
+    <!-- Streaming outermost(): crawling operand, inspection usage -->
+    
+    <xsl:template name="r-020" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:copy-of select="count(outermost(//PRICE))"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template> 
+    
+    <!-- Streaming outermost(): crawling operand, absorption usage -->
+    
+    <xsl:template name="r-021" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:copy-of select="count(outermost(/BOOKLIST/BOOKS/ITEM[1]//text()))"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): crawling operand, transmission usage -->
+    
+    <xsl:template name="r-022" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:copy-of select="outermost(/BOOKLIST/BOOKS/ITEM[1]//text())[position() lt 4]"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): crawling operand, focus-setting usage -->
+    
+    <xsl:template name="r-023" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:copy-of select="outermost(//PRICE/text()) ! (.+1)"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): climbing operand, inspection usage -->
+    
+    <xsl:template name="r-030" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:copy-of select="outermost(/BOOKLIST/BOOKS/ITEM[1]/PRICE/ancestor::*) ! name()"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): climbing operand, inspection usage, removal of duplicates -->
+    
+    <xsl:template name="r-031" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:copy-of select="outermost(/BOOKLIST/BOOKS/ITEM/PRICE/ancestor::*) ! name()"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): climbing operand, absorption usage -->
+    
+    <xsl:template name="r-032" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:value-of select="outermost(/BOOKLIST/BOOKS/ITEM[1]/PRICE/ancestor::*/@*)" separator="|"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): climbing operand, absorption usage -->
+    
+    <xsl:template name="r-033" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:value-of select="outermost(/BOOKLIST/BOOKS/ITEM/ancestor-or-self::*/@CAT)" separator="|"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): climbing operand, absorption usage, removal of duplicates -->
+    
+    <xsl:template name="r-034" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:value-of select="outermost(/BOOKLIST/BOOKS/ITEM/PRICE/ancestor-or-self::*/@CAT)" separator="|"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): climbing operand, absorption usage, removal of duplicates -->
+    
+    <xsl:template name="r-035" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/books.xml')">
+        <out>
+          <xsl:value-of select="outermost(//PRICE/ancestor-or-self::*/@*)" separator="|"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template> 
+    
+    <!-- Streaming outermost(): recursive data -->
+    
+    <xsl:template name="r-100" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/recursive.xml')">
+        <out>
+          <xsl:value-of select="outermost(//section)/@id" separator="|"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <!-- Streaming outermost(): recursive data -->
+    
+    <xsl:template name="r-101" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/recursive.xml')">
+        <out>
+          <xsl:value-of select="outermost(//section/section)/@id" separator="|"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <xsl:template name="r-102" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/recursive.xml')">
+        <out>
+          <xsl:value-of select="outermost(//section/section)/head" separator="|"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+    <xsl:template name="r-103" use-when="$RUN">
+      <xsl:for-each select="doc('../../strm/docs/recursive.xml')">
+        <out>
+          <xsl:value-of select="outermost(//section/section)/foot" separator="|"/>
+        </out>
+      </xsl:for-each>
+    </xsl:template>               
+    
+</xsl:stylesheet>
\ No newline at end of file