Re: Sub-pipelines

Norm/Rui,

Backtracking a little bit: I agree that we need sub-pipelines, that
is, the ability to call a pipeline from a pipeline. However, do we
really need to be able to define those sub-pipelines in the same XML
file? If we don't, we may not need a special syntax to call
sub-pipeline (like the <p:call-pipeline> considered in this thread).

In fact, we could consider that we have a pre-defined component called
"pipeline" that just runs pipeline, just like "xslt" runs a
stylesheet:

    <p:step name="pipeline">
        <p:input name="pipeline" href="expandandvalidate.xpl"/>
        <p:input name="schemas" href="a.xsd"/>
        <p:input name="document" href="mydoc.xml"/>
        <p:output label="ok1"/>
    </p:step>

Alex

On 3/15/06, Norman Walsh <Norman.Walsh@sun.com> wrote:
> I think we've mentioned the possibility of "reusable" pipelines a
> couple of times. It strikes me that in a complex pipeline, I could
> easily wind up with several steps that I wanted to have applied to
> different documents. We could support this by allowing pipelines to
> define sub-pipelines:
>
>   <p:define-pipeline name="expandandvalidate">
>     <p:input name="schemas" label="s"/>
>     <p:input name="document" label="d"/>
>     <p:output/>
>
>     <p:step name="xinclude">
>       <p:input use="d"/>
>     </p:step:>
>
>     <p:step name="validate">
>       <p:input name="schemas" use="s"/>
>       <p:input name="document"/>
>     </p:step>
>   </p:define-pipeline>
>
> I imagine that the labels inside a defined pipeline are local to that
> pipeline. And references to outside labels are forbidden.
>
> Then we allow these steps to be called anywhere that a single step
> could occur:
>
>   <p:call-pipeline name="expandandvalidate">
>     <p:input name="schemas" href="a.xsd"/>
>     <p:input name="document" href="mydoc.xml"/>
>     <p:output label="ok1"/>
>   </p:call-pipeline>
>
>                                         Be seeing you,
>                                           norm
>
> --
> Norman.Walsh@Sun.COM / XML Standards Architect / Sun Microsystems, Inc.
> NOTICE: This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information.
> Any unauthorized review, use, disclosure or distribution is prohibited.
> If you are not the intended recipient, please contact the sender by
> reply email and destroy all copies of the original message.
>
>
>


--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/

Received on Thursday, 16 March 2006 03:26:36 UTC