With input-select 004

Test with-input-select-004.xml is expected to pass.

The pipeline


<p:declare-step xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
   <p:output port="result" sequence="true"/>
   <p:option name="blank" select="''"/>
   <p:option name="class" select="concat($blank, 'b')"/>
   <p:identity>
      <p:with-input port="source" select="//c:chapter[@class=$class]">
         <p:inline>
            <document xmlns="http://www.w3.org/ns/xproc-step">
               <chapter class="a">one</chapter>
               <chapter class="a">two</chapter>
               <chapter class="b">three</chapter>
            </document>
         </p:inline>
      </p:with-input>
   </p:identity>
   <p:wrap-sequence wrapper="c:result"/>
</p:declare-step>
MorganaXProc passing XML Calabash failing

Options

$blank

select = 'x'

Schematron validation


<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
   <s:pattern>
      <s:rule context="/*">
         <s:assert test="self::c:result">The pipeline root is not c:result.</s:assert>
         <s:assert test="count(c:chapter) = 0">There should be no chapters.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

29 Sep 2017 11:02, Norman Walsh

Add tests for @select on p:with-input