ab-option-050

Testing reference to options as default value for other options.

Test ab-option-050.xml is expected to pass.

The pipeline


<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:test="http://test" version="3.0">
   <p:output port="result"/>
   <p:declare-step type="test:step">
      <p:option name="opt1" select="'text'"/>
      <p:option name="opt2" select="concat($opt1,'_1')"/>
      <p:option name="opt3" select="concat($opt2,'_2')"/>
      <p:output port="result"/>
      <p:identity>
         <p:with-input>
            <result>{$opt1} {$opt2} {$opt3}</result>
         </p:with-input>
      </p:identity>
   </p:declare-step>
   <test:step>
      <p:with-option name="opt1" select="'option1'"/>
      <p:with-option name="opt3" select="'option3'"/>
   </test:step>
</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/text()='option1 option1_1 option3'"/>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

24 Apr 2021, Achim Berndzen

Added new tests.