W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > March 2006

Re: Sub-pipelines

From: Alessandro Vernet <avernet@orbeon.com>
Date: Tue, 21 Mar 2006 17:32:10 -0800
Message-ID: <4828ceec0603211732o686502dbjb8317a4bfa90f02c@mail.gmail.com>
To: public-xml-processing-model-wg@w3.org

Jeni, Rui, Norm,

It is a given that we want a pipeline to be able to call another
pipeline. Now this raises two questions, both of which being discussed
in this thread:

1) Do we want to provide a construction in the pipeline language to
declare sub-pipelines, that is: a pipeline declared in a pipeline
document (like some languages allow a function to be declared in a
function)?

Norm suggested a way to declare a sub-pipeline. I asked if we really
need this feature. Rui say he can live with just externally defined
pipelines. I think that we don't really have a use case or requirement
that would justifies adding an additional construction to the
language. So I am not strongly in favor of addressing the issue of how
to define a sub-pipeline in a pipeline in a first version of pipeline
language.

2) Should invoking a pipeline be any different than invoking, say, an
XSLT stylesheet? Should we invoke a pipeline with:

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

Or:

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

Jeni says that the second way is better because it makes it easier for
GUI tools and users to identify reusable parts. I tend to like the
first way, because:

a) It makes the pipeline language simpler (no need to define anything
special to call pipeline).
b) It allows a pipeline to generate another pipeline (say with XSLT)
and to run it.

As Jeni suggested, the pipeline engine can also allow a given pipeline
to be registered as a component and to be called in a step just like
any other component. This would be out of scope as far as this WG is
concerned. For instance, the name "expandandvalidate" could be
assigned to the pipeline expandandvalidate.xpl and that pipeline could
be called with:

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

But I don't have a strong opinion here and I could be convinced the
other way around :).

Alex

On 3/20/06, Jeni Tennison <jeni@jenitennison.com> wrote:
>
> Hi,
>
> [Many apologies if my comments are out-of-whack due to my prolonged
> absence: I've read all the minutes, but they never capture everything.]
>
> Alessandro Vernet wrote:
> > 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>
>
> I agree with Norm's observation that always having to define reusable
> pipelines in separate documents makes things harder than they should be.
> I have two other arguments for why we shouldn't have a pipeline
> component as the only method of reusing pipelines:
>
> (1) It makes it harder for GUIs, other helper applications, and users to
> identify the reusable parts of a pipeline.
>
> (2) It opens the door to dynamically generated pipeline specifications,
> and I don't think we want to go there (do we?).
>
> I don't think that we can or should stop pipeline engines from making a
> pipeline-interpreting component available, but I think we should have a
> native method of reusing subpipelines.
>
> In fact, once a pipeline is given a name then it should be usable just
> like any other component. So once you've defined the 'expandandvalidate'
> pipeline, you should be able to invoke it using the standard syntax for
> invoking components, such as:
>
>    <p:step name="expandandvalidate">
>      <p:input name="schemas" href="a.xsd" />
>      <p:input name="document" href="mydoc.xml" />
>      <p:output label="ok1" />
>    </p:step>
>
> Cheers,
>
> Jeni
> --
> Jeni Tennison
> http://www.jenitennison.com
>
>


--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/
Received on Wednesday, 22 March 2006 01:32:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:47 GMT