AB choose-060

Tests collection() on p:choose

Test ab-choose-060.xml is expected to pass.

The pipeline


      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="pipeline" version="3.0">
         <p:output port="result"/>
         
         <p:choose>
            <p:when test="count(collection())=3" collection="true">
               <p:with-input>
                  <doc1 xmlns=""/>
                  <doc2 xmlns=""/>
                  <doc3 xmlns=""/>
               </p:with-input>
               <p:identity>
                  <p:with-input><right xmlns=""/></p:with-input>
               </p:identity>
            </p:when>
            <p:otherwise>
               <p:identity>
                  <p:with-input><wrong xmlns=""/></p:with-input>
               </p:identity>
            </p:otherwise>
         </p:choose>
      </p:declare-step>
   
XML Calabash passing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:pattern>
            <s:rule context="/">
               <s:assert test="right">The root element is not 'right'.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

12 Jul 2020, Achim Berndzen

Additional tests for p:choose