Static variables/option 013

Tests that two sibling steps can declare a static option with the same name.

Test ab-static-option-var-013.xml is expected to pass.

The pipeline


<p:declare-step xmlns:dummy="http://dummy" xmlns:p="http://www.w3.org/ns/xproc" name="main" version="3.0">
   <p:output port="result"/>
   <p:declare-step type="dummy:test1">
      <p:output port="result"/>
      <p:option static="true" name="static-option" select="13"/>
      <p:identity>
         <p:with-input>
            <doc1>{$static-option}</doc1>
         </p:with-input>
      </p:identity>
   </p:declare-step>
   <p:declare-step type="dummy:test2">
      <p:output port="result"/>
      <p:option static="true" name="static-option" select="14"/>
      <p:identity>
         <p:with-input>
            <doc2>{$static-option}</doc2>
         </p:with-input>
      </p:identity>
   </p:declare-step>
   <dummy:test1 name="one"/>
   <dummy:test2 name="two"/>
   <p:wrap-sequence wrapper="result">
      <p:with-input pipe="@one @two"/>
   </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:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
   <s:pattern>
      <s:rule context="/">
         <s:assert test="result">The pipeline root is not “result”.</s:assert>
         <s:assert test="result/doc1/text()='13'">Text child of doc1 is not
                        '13'.</s:assert>
         <s:assert test="result/doc2/text()='14'">Text child of doc1 is not
                        '14'.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

11 Oct 2018 18:16, Achim Berndzen

Initial test