New tests for conditional-content
authorMichael Kay <mike@saxonica.com>
Thu, 13 Aug 2015 22:36:06 +0100
changeset 1039 04f2e59a9906
parent 1038 7c9c306f7d70
child 1040 45899ebba0f0
New tests for conditional-content
catalog.xml
tests/insn/conditional-content/_conditional-content-test-set.xml
tests/insn/conditional-content/books.xml
tests/insn/conditional-content/conditional-content-A.xsl
tests/strm/si-conditional-content/_si-conditional-content-test-set.xml
tests/strm/si-conditional-content/si-conditional-content-A.xsl
--- a/catalog.xml	Thu Aug 13 10:45:40 2015 +0100
+++ b/catalog.xml	Thu Aug 13 22:36:06 2015 +0100
@@ -100,6 +100,7 @@
       <test-set name="choose" file="tests/insn/choose/_choose-test-set.xml"/>
       <test-set name="xsl-document" file="tests/insn/xsl-document/_xsl-document-test-set.xml"/>
       <test-set name="element" file="tests/insn/element/_element-test-set.xml"/>
+      <test-set name="conditional-content" file="tests/insn/conditional-content/_conditional-content-test-set.xml"/>
       <test-set name="construct-node" file="tests/insn/construct-node/_construct-node-test-set.xml"/>         
       <test-set name="copy" file="tests/insn/copy/_copy-test-set.xml"/>
       <test-set name="evaluate" file="tests/insn/evaluate/_evaluate-test-set.xml"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/conditional-content/_conditional-content-test-set.xml	Thu Aug 13 22:36:06 2015 +0100
@@ -0,0 +1,186 @@
+<?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="conditional-content">
+   <description>Tests xsl:conditional-content instruction introduced in XSLT 3.0 (unstreamed).</description>
+   
+   <environment name="coco-A">
+     <source role="." file="books.xml"/>
+     <stylesheet file="conditional-content-A.xsl"/>
+   </environment>
+   
+   <dependencies>
+      <spec value="XSLT30+"/>
+   </dependencies>
+   
+   <test-case name="coco-001">
+      <description>xsl:element; value is consuming; xsl:conditional-content</description>
+      <created by="Michael Kay" on="2015-08-13"/>
+      <environment ref="coco-A"/>
+      <test>
+         <initial-template name="s-001"/>
+      </test>
+      <result>
+         <assert>empty(/out/a)</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="coco-002">
+      <description>Test of xsl:stream instruction with xsl:conditional-content</description>
+      <created by="Michael Kay" on="2015-08-13"/>
+      <environment ref="coco-A"/>  
+      <test>
+         <initial-template name="s-002"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<Results><first>one</first><last>last</last></Results>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="coco-003">
+      <description>Test of xsl:conditional-content with atomic values, some 'empty'</description>
+      <created by="Michael Kay" on="2015-08-13"/>
+      <environment ref="coco-A"/>  
+      <test>
+         <initial-template name="s-003"/>
+      </test>
+      <result>
+         <assert>/out = "23 2011-01-01 0"</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="coco-004">
+      <description>Test of xsl:conditional-content with xsl:if</description>
+      <created by="Michael Kay" on="2015-08-13"/>
+      <environment ref="coco-A"/>  
+      <test>
+         <initial-template name="s-004"/>
+      </test>
+      <result>
+         <assert>empty(/out/*)</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="coco-005">
+      <description>Test of xsl:conditional-content with xsl:if</description>
+      <created by="Michael Kay" on="2015-08-13"/>
+      <environment ref="coco-A"/>  
+      <test>
+         <initial-template name="s-005"/>
+      </test>
+      <result>
+         <assert>exists(/out/a/banana)</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="coco-006">
+      <description>Test of xsl:conditional-content with xsl:for-each</description>
+      <created by="Michael Kay" on="2015-08-13"/>
+      <environment ref="coco-A"/>  
+      <test>
+         <initial-template name="s-006"/>
+      </test>
+      <result>
+         <assert>exists(/out/ul/li)</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="coco-007">
+      <description>Test of xsl:conditional-content with xsl:for-each</description>
+      <created by="Michael Kay" on="2015-08-13"/>
+      <environment ref="coco-A"/>  
+      <test>
+         <initial-template name="s-007"/>
+      </test>
+      <result>
+         <assert>empty(/out/node())</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="coco-008">
+      <description>Test of xsl:conditional-content with comment nodes</description>
+      <created by="Michael Kay" on="2015-08-13"/>
+      <environment ref="coco-A"/>  
+      <test>
+         <initial-template name="s-008"/>
+      </test>
+      <result>
+         <assert>count(/out/in/comment()[.='3']) = 6</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="coco-009">
+      <description>Test of xsl:conditional-content with text nodes</description>
+      <created by="Michael Kay" on="2015-08-13"/>
+      <environment ref="coco-A"/>  
+      <test>
+         <initial-template name="s-009"/>
+      </test>
+      <result>
+         <assert>count(/out/in[.='3']) = 6</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="coco-010">
+      <description>Test of xsl:conditional-content with xsl:fork</description>
+      <created by="Michael Kay" on="2015-08-13"/>
+      <environment ref="coco-A"/>  
+      <test>
+         <initial-template name="s-010"/>
+      </test>
+      <result>
+         <assert-xml><![CDATA[<out><a><TITLE>Pride and Prejudice</TITLE><TITLE>Wuthering Heights</TITLE
+         ><TITLE>Tess of the d'Urbervilles</TITLE><TITLE>Jude the Obscure</TITLE><TITLE>The Big Over Easy</TITLE
+         ><TITLE>The Eyre Affair</TITLE><PRICE>4.95</PRICE><PRICE>6.58</PRICE><PRICE>4.95</PRICE><PRICE>4.95</PRICE
+         ><PRICE>16.47</PRICE><PRICE>16.47</PRICE></a></out>]]></assert-xml>
+      </result>
+   </test-case>
+   
+   <test-case name="coco-011">
+      <description>Test of xsl:conditional-content with xsl:fork</description>
+      <created by="Michael Kay" on="2015-08-13"/>
+      <test>
+         <initial-template name="s-011"/>
+      </test>
+      <result>
+         <assert>empty(/out/node())</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="coco-012">
+      <description>Test of xsl:conditional-content with document nodes</description>
+      <created by="Michael Kay" on="2015-08-13"/>
+      <environment ref="coco-A"/>  
+      <test>
+         <initial-template name="s-012"/>
+      </test>
+      <result>
+         <assert>/out/in/@value = 'true'</assert>
+      </result>
+   </test-case>
+
+   <test-case name="coco-013">
+      <description> Test of xsl:conditional-content with maps (bug 28989) </description>
+      <created by="Michael Kay" on="2015-08-14"/>
+      <environment ref="coco-A"/>  
+      <test>
+         <initial-template name="s-013"/>
+      </test>
+      <result>
+         <assert>/out/in/@count = '0'</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="coco-014">
+      <description> Test of xsl:conditional-content with maps (bug 28989) </description>
+      <created by="Michael Kay" on="2015-08-14"/>
+      <environment ref="coco-A"/>  
+      <test>
+         <initial-template name="s-014"/>
+      </test>
+      <result>
+         <assert>/out/in/@count = '1'</assert>
+      </result>
+   </test-case>
+
+
+
+</test-set>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/conditional-content/books.xml	Thu Aug 13 22:36:06 2015 +0100
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<BOOKLIST>
+<BOOKS OWNER="MHK">
+	<ITEM CAT="MMP">
+    	<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>
+	</ITEM>
+	<ITEM CAT="P">
+		<TITLE>Wuthering Heights</TITLE>
+		<AUTHOR>Charlotte Bront&#xeb;</AUTHOR>
+		<PUBLISHER>Penguin Classics</PUBLISHER>
+		<PUB-DATE>2002-12-31</PUB-DATE>
+		<LANGUAGE>English</LANGUAGE>
+		<PRICE>6.58</PRICE>
+		<QUANTITY>113</QUANTITY>		
+		<ISBN>0141439556</ISBN>
+		<PAGES>430</PAGES>
+        <DIMENSIONS UNIT="in">1.0 5.2 7.8</DIMENSIONS>
+		<WEIGHT UNIT="oz">11.2</WEIGHT>
+	</ITEM>
+	<ITEM CAT="P">
+		<TITLE>Tess of the d'Urbervilles</TITLE>
+		<AUTHOR>Thomas Hardy</AUTHOR>
+		<PUBLISHER>Bantam Classics</PUBLISHER>
+		<PUB-DATE>1984-05-01</PUB-DATE>
+		<LANGUAGE>English</LANGUAGE>
+		<PRICE>4.95</PRICE>
+		<QUANTITY>85</QUANTITY>		
+		<ISBN>0553211684</ISBN>
+		<PAGES>480</PAGES>
+        <DIMENSIONS UNIT="in">6.8 4.2 0.8</DIMENSIONS>
+		<WEIGHT UNIT="oz">7.7</WEIGHT>
+	</ITEM>
+	<ITEM CAT="P">
+		<TITLE>Jude the Obscure</TITLE>
+		<AUTHOR>Thomas Hardy</AUTHOR>
+		<PUBLISHER>Penguin Classics</PUBLISHER>
+		<PUB-DATE>1998-09-01</PUB-DATE>
+		<LANGUAGE>English</LANGUAGE>
+		<PRICE>4.95</PRICE>
+		<QUANTITY>129</QUANTITY>		
+		<ISBN>0140435387</ISBN>
+		<PAGES>528</PAGES>
+        <DIMENSIONS UNIT="in">7.8 5.2 0.9</DIMENSIONS>
+		<WEIGHT UNIT="oz">10.9</WEIGHT>
+	</ITEM>
+	<ITEM CAT="H">
+		<TITLE>The Big Over Easy</TITLE>
+		<AUTHOR>Jasper Fforde</AUTHOR>
+		<PUBLISHER>Hodder &amp; Stoughton</PUBLISHER>
+		<PUB-DATE>2005-07-11</PUB-DATE>
+		<LANGUAGE>English</LANGUAGE>
+		<PRICE>16.47</PRICE>
+		<QUANTITY>129</QUANTITY>		
+		<ISBN>0340835672</ISBN>
+		<PAGES>346</PAGES>
+        <DIMENSIONS UNIT="cm">22.5 18.0 3.5</DIMENSIONS>
+		<WEIGHT UNIT="g">390</WEIGHT>
+	</ITEM>
+	<ITEM CAT="P">
+		<TITLE>The Eyre Affair</TITLE>
+		<AUTHOR>Jasper Fforde</AUTHOR>
+		<PUBLISHER>Penguin</PUBLISHER>
+		<PUB-DATE>2003-02-25</PUB-DATE>
+		<LANGUAGE>English</LANGUAGE>
+		<PRICE>16.47</PRICE>
+		<QUANTITY>129</QUANTITY>		
+		<ISBN>0142001805</ISBN>
+		<PAGES>384</PAGES>
+        <DIMENSIONS UNIT="in">7.8 5.0 0.9</DIMENSIONS>
+		<WEIGHT UNIT="oz">9.0</WEIGHT>
+	</ITEM>
+
+</BOOKS>
+<CATEGORIES DESC="Miscellaneous categories">
+    <CATEGORY CODE="P" DESC="Paperback"/>
+    <CATEGORY CODE="MMP" DESC="Mass-market Paperback"/>
+    <CATEGORY CODE="H" DESC="Hard Cover"/>
+</CATEGORIES>
+</BOOKLIST>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/insn/conditional-content/conditional-content-A.xsl	Thu Aug 13 22:36:06 2015 +0100
@@ -0,0 +1,249 @@
+<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: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="*"/>
+
+  <xsl:variable name="doc" select="/"/>
+ 
+  <!-- Test of xsl:conditional-content with xsl:element (not empty) -->
+
+  <xsl:template name="s-001" use-when="$RUN">
+    <xsl:for-each select="$doc">
+      <out>
+        <xsl:conditional-content>
+          <xsl:element name="a">
+            <xsl:sequence select="./BOOKLIST/BOOKS/ITEM/PRICEDATA"/>
+          </xsl:element>
+        </xsl:conditional-content>  
+      </out>
+    </xsl:for-each>
+  </xsl:template>
+  
+  <!-- Test of xsl:conditional-content with multiple elements, some empty -->
+  
+  <xsl:template name="s-002" use-when="$RUN">
+       <xsl:for-each select="$doc">
+           <Results>
+               <xsl:conditional-content>
+                 <first>one</first>
+                 <second/>
+                 <xsl:copy-of select="BOOKLIST/CATEGORIES/*" />
+                 <last>last</last>
+               </xsl:conditional-content>
+           </Results>
+       </xsl:for-each>
+   </xsl:template> 
+   
+   <!-- Test of xsl:conditional-content with atomic values, some empty -->
+  
+  <xsl:template name="s-003" use-when="$RUN">
+       <xsl:for-each select="$doc">
+           <out>
+               <xsl:conditional-content>
+                 <xsl:sequence select="23, '', xs:date('2011-01-01'), xs:untypedAtomic(''), 0, /JUNK, xs:base64Binary('')"/>
+               </xsl:conditional-content>
+           </out>
+       </xsl:for-each>
+   </xsl:template>
+   
+   <!-- Test of xsl:conditional-content with xsl:if -->
+
+  <xsl:template name="s-004" use-when="$RUN">
+    <xsl:for-each select="$doc">
+      <out>
+        <xsl:conditional-content>
+          <a>
+            <xsl:if test="current-date() lt xs:date('1900-01-01')">
+               <banana x="{count(//*)}"/>
+            </xsl:if>
+          </a>
+        </xsl:conditional-content>  
+      </out>
+    </xsl:for-each>
+  </xsl:template> 
+  
+  <!-- Test of xsl:conditional-content with xsl:if -->
+
+  <xsl:template name="s-005" use-when="$RUN">
+    <xsl:for-each select="$doc">
+      <out>
+        <xsl:conditional-content>
+          <a>
+            <xsl:if test="current-date() gt xs:date('1900-01-01')">
+               <banana x="{count(//*)}"/>
+            </xsl:if>
+          </a>
+        </xsl:conditional-content>  
+      </out>
+    </xsl:for-each>
+  </xsl:template> 
+  
+  <!-- Test of xsl:conditional-content with xsl:for-each -->
+
+  <xsl:template name="s-006" use-when="$RUN">
+    <xsl:for-each select="$doc">
+      <out>
+        <xsl:conditional-content>
+          <ul>
+            <xsl:for-each select="outermost(//ITEM)">
+              <li><xsl:value-of select="TITLE"/></li>
+            </xsl:for-each>  
+          </ul>
+        </xsl:conditional-content>  
+      </out>
+    </xsl:for-each>
+  </xsl:template> 
+  
+  <!-- Test of xsl:conditional-content with xsl:for-each -->
+
+  <xsl:template name="s-007" use-when="$RUN">
+    <xsl:for-each select="$doc">
+      <out>
+        <xsl:conditional-content>
+          <ul>
+            <xsl:for-each select="outermost(//MAGAZINE)">
+              <li><xsl:value-of select="TITLE"/></li>
+            </xsl:for-each>  
+          </ul>
+        </xsl:conditional-content>  
+      </out>
+    </xsl:for-each>
+  </xsl:template> 
+  
+  <!-- Test of xsl:conditional-content with comment nodes -->
+
+  <xsl:template name="s-008" use-when="$RUN">
+    <xsl:for-each select="$doc">
+      <out>
+        <xsl:for-each select="outermost(//ITEM)">
+          <in>
+            <xsl:conditional-content>
+              <xsl:comment select="TITLE[parent::BOOK]"/>
+            </xsl:conditional-content>
+            <xsl:conditional-content>
+              <xsl:comment select="count(ancestor::node())"/>
+            </xsl:conditional-content> 
+          </in>  
+         </xsl:for-each>  
+      </out>
+    </xsl:for-each>
+  </xsl:template> 
+  
+  <!-- Test of xsl:conditional-content with text nodes -->
+
+  <xsl:template name="s-009" use-when="$RUN">
+    <xsl:for-each select="$doc">
+      <out>
+        <xsl:for-each select="outermost(//ITEM)">
+          <in>
+            <xsl:conditional-content>
+              <xsl:value-of select="TITLE[parent::BOOK]"/>
+            </xsl:conditional-content>
+            <xsl:conditional-content>
+              <xsl:value-of select="count(ancestor::node())"/>
+            </xsl:conditional-content> 
+          </in>  
+         </xsl:for-each>  
+      </out>
+    </xsl:for-each>
+  </xsl:template> 
+  
+  <!-- Test of xsl:conditional-content with xsl:fork -->
+
+  <xsl:template name="s-010" use-when="$RUN">
+    <xsl:for-each select="$doc">
+      <out>
+        <xsl:conditional-content>
+          <a>
+            <xsl:fork>
+              <xsl:sequence select="copy-of(//TITLE)"/>
+              <xsl:sequence select="copy-of(//PRICE)"/>  
+            </xsl:fork>
+          </a>
+        </xsl:conditional-content>  
+      </out>
+    </xsl:for-each>
+  </xsl:template> 
+  
+  <!-- Test of xsl:conditional-content with xsl:fork -->
+
+  <xsl:template name="s-011" use-when="$RUN">
+    <xsl:for-each select="$doc">
+      <out>
+        <xsl:conditional-content>
+          <a>
+            <xsl:fork>
+              <xsl:sequence select="copy-of(//TITTLE)"/>
+              <xsl:sequence select="copy-of(//PRICLE)"/>  
+            </xsl:fork>
+          </a>
+        </xsl:conditional-content>  
+      </out>
+    </xsl:for-each>
+  </xsl:template>
+  
+  <!-- Test of xsl:conditional-content with document nodes -->
+  
+  <xsl:template name="s-012" use-when="$RUN">
+    <xsl:for-each select="$doc">
+      <out>
+        <xsl:variable name="t" as="document-node()?">          
+          <xsl:conditional-content>
+            <xsl:document>
+              <xsl:copy-of select="//TITLE[@flamingo]"/>
+            </xsl:document>
+          </xsl:conditional-content>
+        </xsl:variable>
+        <in value="{empty($t)}"/>     
+      </out>
+    </xsl:for-each>
+  </xsl:template> 
+  
+  <!-- Test of xsl:conditional-content with maps (bug 28989) -->
+  
+  <xsl:template name="s-013" use-when="$RUN">
+    <xsl:for-each select="$doc">
+      <out>
+        <xsl:variable name="m" as="map(*)?">          
+          <xsl:conditional-content>
+            <!-- empty map -->
+            <xsl:map>
+              <xsl:for-each select="/*/*/QUARGLE">
+                <xsl:map-entry key="@id" select="data(@pongle)"/>
+              </xsl:for-each>
+            </xsl:map>
+          </xsl:conditional-content>
+        </xsl:variable>
+        <in count="{count($m)}"/>     
+      </out>
+    </xsl:for-each>
+  </xsl:template> 
+  
+  <!-- Test of xsl:conditional-content with maps (bug 28989) -->
+  
+  <xsl:template name="s-014" use-when="$RUN">
+    <xsl:for-each select="$doc">
+      <out>
+        <xsl:variable name="m" as="map(*)?">          
+          <xsl:conditional-content>
+            <!-- non-empty map -->
+            <xsl:map>
+              <xsl:for-each select="/*/*/ITEM">
+                <xsl:map-entry key="generate-id()" select="copy-of(TITLE)"/>
+              </xsl:for-each>
+            </xsl:map>
+          </xsl:conditional-content>
+        </xsl:variable>
+        <in count="{count($m)}"/>     
+      </out>
+    </xsl:for-each>
+  </xsl:template> 
+ 
+
+
+
+
+</xsl:stylesheet>
--- a/tests/strm/si-conditional-content/_si-conditional-content-test-set.xml	Thu Aug 13 10:45:40 2015 +0100
+++ b/tests/strm/si-conditional-content/_si-conditional-content-test-set.xml	Thu Aug 13 22:36:06 2015 +0100
@@ -158,5 +158,30 @@
       </result>
    </test-case>
 
+   <test-case name="si-coco-013">
+      <description> Test of xsl:conditional-content with maps (bug 28989) </description>
+      <created by="Michael Kay" on="2015-08-14"/>
+      <environment ref="si-coco-A"/>  
+      <test>
+         <initial-template name="s-013"/>
+      </test>
+      <result>
+         <assert>/out/in/@count = '0'</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="si-coco-014">
+      <description> Test of xsl:conditional-content with maps (bug 28989) </description>
+      <created by="Michael Kay" on="2015-08-14"/>
+      <environment ref="si-coco-A"/>  
+      <test>
+         <initial-template name="s-014"/>
+      </test>
+      <result>
+         <assert>/out/in/@count = '1'</assert>
+      </result>
+   </test-case>
+
+
 
 </test-set>
\ No newline at end of file
--- a/tests/strm/si-conditional-content/si-conditional-content-A.xsl	Thu Aug 13 10:45:40 2015 +0100
+++ b/tests/strm/si-conditional-content/si-conditional-content-A.xsl	Thu Aug 13 22:36:06 2015 +0100
@@ -200,6 +200,46 @@
       </out>
     </xsl:stream>
   </xsl:template> 
+  
+  <!-- Test of xsl:conditional-content with maps (bug 28989) -->
+  
+  <xsl:template name="s-013" use-when="$RUN">
+    <xsl:stream href="../docs/books.xml">
+      <out>
+        <xsl:variable name="m" as="map(*)?">          
+          <xsl:conditional-content>
+            <!-- empty map -->
+            <xsl:map>
+              <xsl:for-each select="/*/*/QUARGLE">
+                <xsl:map-entry key="@id" select="data(@pongle)"/>
+              </xsl:for-each>
+            </xsl:map>
+          </xsl:conditional-content>
+        </xsl:variable>
+        <in count="{count($m)}"/>     
+      </out>
+    </xsl:stream>
+  </xsl:template> 
+  
+  <!-- Test of xsl:conditional-content with maps (bug 28989) -->
+  
+  <xsl:template name="s-014" use-when="$RUN">
+    <xsl:stream href="../docs/books.xml">
+      <out>
+        <xsl:variable name="m" as="map(*)?">          
+          <xsl:conditional-content>
+            <!-- non-empty map -->
+            <xsl:map>
+              <xsl:for-each select="/*/*/ITEM">
+                <xsl:map-entry key="generate-id()" select="copy-of(TITLE)"/>
+              </xsl:for-each>
+            </xsl:map>
+          </xsl:conditional-content>
+        </xsl:variable>
+        <in count="{count($m)}"/>     
+      </out>
+    </xsl:stream>
+  </xsl:template>