W3C home > Mailing lists > Public > xproc-dev@w3.org > June 2012

Re: Non-primary port connection between non-contiguous steps

From: Romain Deltour <rdeltour@gmail.com>
Date: Tue, 5 Jun 2012 16:32:29 +0200
Cc: XProc Dev <xproc-dev@w3.org>
Message-Id: <EAD04B65-F827-4B06-8B3C-82D0BECA64AB@gmail.com>
To: Yves Forkl <Y.Forkl@srz.de>
p:declare-step is used to *declare* the step, it's p:input and p:output declare it's signature and default bindings. Once you declared these steps (usually in a XProc library), you will be able to invoke them in your main pipeline using their declared types:

<srz:step1>
  ... declare connections...
</srz:step1>
<src:step1>
  ... declare connections...
</srz:step2>
<srz:step2>
  ... declare connections...
</srz:step2>

Hope this helps,
Romain.

On 5 juin 2012, at 16:21, Yves Forkl wrote:

> I have trouble setting up a pipeline of 3 steps which should connect roughly like this:
> 
> pipeline input -> STEP 1 -> non-primary input to step 3
> 
> external document -> STEP 2 -> primary input to step 3
> 
> primary output from step 2 + output from step 1 -> STEP 3 -> multiple files
> 
> 
> Here is a sketch of the 3 step definitions I have come up with:
> 
>  <p:declare-step name="step1" type="srz:step1">
>    <p:input port="source"/>
>    <p:output port="result" primary="false"/>
>    <!-- . . . -->
>  </p:declare-step>
> 
>  <p:declare-step name="step2" type="srz:step2">
>    <p:input port="source" primary="false">
>      <p:document href="input_step2.xml"/>
>    </p:input>
>    <p:output port="result"/>
>    <!-- . . . -->
>  </p:declare-step>
> 
>  <p:declare-step name="step3" type="srz:step3">
>    <p:input port="source" primary="true"/>
>    <p:input port="result_from_step1" primary="false">
>      <p:pipe step="step1" port="result"/>
>    </p:input>
>    <p:output port="result" sequence="true">
>      <p:pipe step="store-each" port="result"/>
>    </p:output>
>    <!-- . . . -->
>    <p:for-each name="store-each">
>      <p:variable name="position" select="p:iteration-position()" />
>      <p:store name="store"
>        omit-xml-declaration="false"
>        indent="false">
>        <p:with-option name="href"
>          select="concat('outputfile', $position, '.xml')"/>
>      </p:store>
>      <!-- . . . -->
>    </p:for-each>
>  </p:declare-step>
> 
> When I try to run these steps sequentially in a pipeline, Calabash (V. 0.9.44.94) complains about binding port result_from_step1 in step 3 saying: "Default input bindings cannot use p:pipe"
> 
> It does not occur to me why binding that non-primary input port interferes with default input bindings.
> 
> What am I missing? How can I achieve the desired flow of information?
> 
> (If the code fragment above doesn't reveal my mistake to you in an obvious way, I could try to rework my real and more complex pipeline together with the data files into a complete test case.)
> 
> Yves
> 
Received on Tuesday, 5 June 2012 16:28:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 5 June 2012 16:28:46 GMT