AB for-each 020

Tests two output ports on p:output, none is primary.

Test ab-for-each-020.xml is expected to pass.

The pipeline


<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
   <p:output port="result"/>
   <p:identity>
      <p:with-input>
         <doc1/>
         <doc2/>
      </p:with-input>
   </p:identity>
   <p:for-each name="for-each">
      <p:output port="result" primary="false">
         <p:pipe step="identity" port="result"/>
      </p:output>
      <p:output port="secondary">
         <p:pipe step="secondary" port="result"/>
      </p:output>
      <p:identity name="secondary">
         <p:with-input>
            <secondary/>
         </p:with-input>
      </p:identity>
      <p:identity name="identity">
         <p:with-input pipe="current@for-each"/>
      </p:identity>
   </p:for-each>
   <p:wrap-sequence wrapper="result">
      <p:with-input>
         <p:pipe step="for-each" port="result"/>
         <p:pipe step="for-each" port="secondary"/>
      </p:with-input>
   </p:wrap-sequence>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Schematron validation


<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:pattern>
      <s:rule context="/">
         <s:assert test="result">The document root is not 'result'.</s:assert>
         <s:assert test="result/*[1]/name()='doc1'">First child is not 'doc1'.</s:assert>
         <s:assert test="result/*[2]/name()='doc2'">Second child is not 'doc2'.</s:assert>
         <s:assert test="result/*[3]/name()='secondary'">Third child is not 'secondary'.</s:assert>
         <s:assert test="result/*[4]/name()='secondary'">Fourth child is not 'secondary'.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

18 Sep 2019, Achim Berndzen

Initial test