Step available 051 (AB)

Tests function p:step-available with use-when.

Test is expected to fail with error code err:XS0115.

The pipeline

<p:declare-step xmlns:err="http://www.w3.org/ns/xproc-error"
                xmlns:ex="http://extension-step.org" xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:t="http://xproc.org/ns/testsuite/3.0" name="main" version="3.0">
   <p:output port="result"/>
   <p:declare-step type="ex:test"
                   use-when="p:step-available('ex:test1')">
      <p:output port="result"/>
      <p:identity>
         <p:with-input>
            <doc/>
         </p:with-input>
      </p:identity>
   </p:declare-step>
   <p:declare-step type="ex:test1"
                   use-when="p:step-available('ex:test')">
      <p:output port="result"/>
      <p:identity>
         <p:with-input>
            <doc/>
         </p:with-input>
      </p:identity>
   </p:declare-step>
   <p:identity>
      <p:with-input>
         <result>
            <test>{p:step-available('ex:test')}</test>
            <test1>{p:step-available('ex:test1')}</test1>
         </result>
      </p:with-input>
   </p:identity>
</p:declare-step>

Revision history

30 Dec 2021, Achim Berndzen
Test added.