Static option 001 (NW)

This test demonstrates that a static option that doesn’t have an initializer can be used in a nested p:declare-step. Added because this combination revealed a bug in XML Calabash.

Test nw-static-option-001.xml is expected to pass.

The pipeline


<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:s="http://example.com/ns/steps" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="main" version="3.1" exclude-inline-prefixes="#all">
   <p:option name="opt" as="xs:string?" static="true"/>
   <p:output port="result"/>
   <p:declare-step type="s:inner-step">
      <p:output port="result"/>
      <p:identity>
         <p:with-input>
            <value>{$opt}</value>
         </p:with-input>
      </p:identity>
   </p:declare-step>
   <s:inner-step/>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Options

$opt

select = 'external value'

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="value">The pipeline root is not “value”.</s:assert>
         <s:assert test="value/text() = 'external value'">The result is incorrect.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

14 Jun 2025, Norm Tovey-Walsh

Initial test