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

Pipeline Composition and our Recent Pipeline Name/Library Decision

From: Alex Milowski <alex@milowski.org>
Date: Thu, 15 Mar 2007 11:28:46 -0700
Message-ID: <28d56ece0703151128v27414954idf77d909f81b8c3b@mail.gmail.com>
To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>
It is often the case that I want to reuse a pipeline as a single step
in my pipelines.  In our current syntax, you can just import that
single pipeline by pointing to the pipeline document.  You do not
need to create a new document that starts with "p:pipeline-library".

For example, suppose I have pipeline A (a.xpd) and I want pipeline B (b.xpd)
to use that pipeline as a step.  Right now I can import that pipeline


   <p:pipeline name="a" ...>
      <p:import href="b.xpd"/>
      <b name="invoke-b"> ... </b>


  <p:pipeline name="b" ...>

if I then want to include that in a library, I import the
same pipeline:


   <p:import href="b.xpd"/>

(which, BTW, is underspecified in the spec right now).

If the pipeline library has a target namespace:

<p:pipeline-library namespace="http://www.milowski.com/lib">
   <p:import href="b.xpd"/>

then b inside that library would have a different name that if I just
imported the name directly.

That is, the same pipeline has a different invocation with the same NCName

<p:pipeline name="a" ...>
   <p:import href="b.xpd"/>
    <b name="invoke-b">...</b>

<p:pipeline name="a" xmlns:m="http://www.milowski.com/lib" ...>
   <p:import href="lib.xpd"/>
   <m:b name="invoke-b">...</m:b>

If the name of the pipeline remained a QName value, the invocation
would be the same.

If you just have two pipelines and you want one to invoke the other,
then not using a pipeline library (which requires a third document) is
the simplest case of reuse.  I presume that it will be natural for
people to start with that kind of reuse and consider making a library of
them later.  As such, they'll be surprised when the invocation changes.

--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language

Bertrand Russell in a footnote of Principles of Mathematics
Received on Thursday, 15 March 2007 18:28:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:42 UTC