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

Re: Sub-pipelines

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 22 Mar 2006 15:10:44 +0000
Message-ID: <442168F4.7030006@jenitennison.com>
To: public-xml-processing-model-wg@w3.org

Alessandro,

Alessandro Vernet wrote:
> 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)?

I don't think so. I'd like to see documents in which all pipelines are 
declared at the same level. Something along the lines of:

<p:processes xmlns:p="..."
              xmlns:my="...">

<p:process name="my:expandandvalidate">
   <p:input name="schemas" label="s" />
   <p:input name="document" label="d" />
   <p:pipeline>
     <p:step use="p:xinclude">
       <p:input name="document" use="d" />
       <p:output />
     </p:step>
     <p:step use="p:xmlschema">
       <p:input name="document" />
       <p:input name="schemas" use="s" />
       <p:output />
     </p:step>
   </p:pipeline>
   <p:output />
</p:process>

<p:process name="my:otherprocess">
   <p:input name="document" label="d" />
   <p:pipeline>
     <p:step use="my:expandandvalidate">
       <p:input name="document" use="d" />
       <p:input name="schemas" href="a.xsd b.xsd c.xsd" />
       <p:ouput />
     </p:step>
     <p:step use="p:xslt2.0">
       <p:input name="document" />
       <p:input name="stylesheet" href="d.xsl" />
       <p:output />
     </p:step>
   </p:pipeline>
   <p:output />
</p:process>

...other <p:process> elements...

</p:processes>

I guess I think of these as process libraries rather than as individual 
documents identifying a single pipeline process.

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

I guess that I don't agree that the first way is actually simpler for 
most users: it's conceptually elegant but I think most users will only 
look at the surface simplicity of the processing language and resent 
having to load multiple documents to work out what a pipeline is doing.

Plus I don't think that allowing a pipeline to generate another pipeline 
is necessarily a good idea: I think that the pipeline language should be 
powerful enough for most processing tasks without having to resort to 
auto-generated pipeline specifications. It would be good to see examples 
where you've found it necessary to use them.

On the other hand we cannot and should not disallow the first pattern; 
we could provide a standard name for such a component, but I don't think 
it should be within the set of minimal components required for 
interoperability.

Cheers,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com
Received on Wednesday, 22 March 2006 15:10:42 GMT

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