Re: Sub-pipelines

Norman Walsh 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>

I would like to add that a pipeline should be called not just by name, 
but through hrefs, allowing the execution of external pipelines as 
services, e.g.:

<p:call-pipeline href="my-other-pipeline.xml#expandandvalidate">
    ...
</p:call-pipline>

or

<p:call-pipeline 
href="http://www.mycompany.com/pipes/validate.xml#somecomplexvalidation">
    ...
</p:call-pipeline>


--Rui

Received on Wednesday, 15 March 2006 15:16:15 UTC