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

Non-primary port connection between non-contiguous steps

From: Yves Forkl <Y.Forkl@srz.de>
Date: Tue, 05 Jun 2012 16:21:55 +0200
Message-ID: <4FCE1603.1000807@srz.de>
To: XProc Dev <xproc-dev@w3.org>
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 14:22:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 5 June 2012 14:22:59 GMT