nw p-run-002

Test passing map to step with p:run

Test nw-p-run-002.xml is expected to pass.

It requires the following features: p-run.

The pipeline

<p:declare-step xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
   <p:output port="result"/>
   <p:variable name="params" as="array(*)" select="array{1,2,3}"/>
   <p:run name="run-fix">
      <p:with-input href="../pipelines/invoked-arr.xpl"/>
      <p:run-input port="source" primary="true">
         <p:empty/>
      </p:run-input>
      <p:run-option name="parameters" select="$params"/>
      <p:output port="result" primary="true"/>
   </p:run>
</p:declare-step>
XML Calabash passing

Schematron validation

<s:schema xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:ns prefix="fn" uri="http://www.w3.org/2005/xpath-functions"/>
   <s:pattern>
      <s:rule context="/">
         <s:assert test="fn:array">The root element is not fn:array.</s:assert>
         <s:assert test="count(fn:array/fn:number) = 3">Wrong number of items.</s:assert>
         <s:assert test="fn:array/fn:number[1] = 1">First item is wrong.</s:assert>
         <s:assert test="fn:array/fn:number[2] = 2">Second item is wrong.</s:assert>
         <s:assert test="fn:array/fn:number[3] = 3">Third item is wrong.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

18 Jul 2026, Norm Tovey-Walsh

Added tests for p:run