ab-option-042

Testing reference to options as default value for other options.

Test ab-option-042.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: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 xmlns="">{$opt1} {$opt2} {$opt3}</result>
               </p:with-input>
            </p:identity> 
         </p:declare-step>
         
         <test:step xmlns:test="http://test" opt1="option1" opt2="option2"/>
         
      </p:declare-step>
   
MorganaXProc passing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:pattern>
            <s:rule context="/">
               <s:assert test="result">The document root is not 'result'.</s:assert>
               <s:assert test="result/text()='option1 option2 option2_2'"/>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

24 Apr 2021, Achim Berndzen

Added new tests.