Previous Up Next


p:parameters — Converts step parameters into XML.


<p:declare-step type="p:parameters">
     <p:input port="parameters" kind="parameter" primary="false"/>
     <p:output port="result" primary="false"/>


The p:parameters step accepts any number of parameters and delivers them back in a c:param-set document.

Each parameter passed to the step is converted into a c:param element. The step resolves duplicate parameters in the normal way (see Section 3, “Parameters”) so at most one parameter with any given name will appear in the result. The resulting c:param elements are wrapped in a c:param-set and the parameter set document is written to the result port.

The p:parameters step always uses the namespace attribute on c:param if the parameter is in a namespace. In other words, the name on the c:param will never contain a colon.


Pipelines can't directly access parameters by name (because the names of parameters aren't known in advance). To find out what parameters were passed to the pipeline, the p:parameters step is first used to create a document, then that document can be interrogated with XPath.

This pipeline just prints the parameters passed to it (in this case, param with the value “value” and cx:test with the value “othervalue”).

  1 <p:pipeline xmlns:p="" name="main"
      <p:parameters name="params">
  5     <p:input port="parameters">
          <p:pipe step="main" port="parameters"/>
 10   <p:identity>
        <p:input port="source">
          <p:pipe step="params" port="result"/>
 15 </p:pipeline>
1 <c:param-set xmlns:c="">
<c:param name="param" value="value"/>
<c:param name="test"
5 value="othervalue"/>

Note that neither the parameters port nor the result output on p:parameters are primary, so we must connect to them explicitly.