RE: dynamic XProc?

> -----Original Message-----
> From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On
Behalf Of
> Romain Deltour
> Sent: Tuesday, June 01, 2010 9:19 PM
> To: xproc-dev@w3.org
> Subject: Re: dynamic XProc?


> Calabash's cx:eval deal with this complexity by allowing to
> "multiplex" the several input/output ports to a single port on the
> eval step (read the doc for more details). I don't know how Calumet's
> implementation works.

For input and output documents, the emc:eval step in Calumet uses one
input port and one output port. For dynamic pipelines that have multiple
input ports, you can "multiplex" the data for the different input ports
by passing a sequence of documents with a special wrapper element that
says which input port the document should be passed to. Similarly, if
the dynamic pipeline has multiple output ports, you get a sequence of
documents where each document is wrapped in a wrapper that says which
output port the document appeared on.

Example:

  <emx:eval detailed-input="true">
    <p:input port="source">
      <p:inline>
        <emx:document> <!-- no port: use primary input port -->
          <doc>One</doc>
        </emx:document>
      </p:inline>
      <p:inline>
        <emx:document port="second-input"> <!-- use "second-input" -->
          <doc>Two</doc>
        </emx:document>
      </p:inline>
      <p:inline> <!-- no wrapper: use primary input port -->
        <doc>Three</doc>
      </p:inline>	
    </p:input>

    <p:input port="pipeline">
      <p:inline>
        <p:declare-step version="1.0">
          <p:input port="first-input" sequence="true" primary="true"/>
          <p:input port="second-input"/>
          <p:output port="result/>
          ...
        </p:declare-step>
      </p:inline>	
    </p:input>
  </emx:eval>

Regards,
Vojtech

--
Vojtech Toman
Principal Software Engineer
EMC Corporation
toman_vojtech@emc.com
http://developer.emc.com/xmltech

Received on Wednesday, 2 June 2010 08:35:23 UTC