- From: Alex Milowski <alex@milowski.org>
- Date: Thu, 15 Mar 2007 11:28:46 -0700
- To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>
- Message-ID: <28d56ece0703151128v27414954idf77d909f81b8c3b@mail.gmail.com>
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 via: a.xpd: <p:pipeline name="a" ...> <p:import href="b.xpd"/> <b name="invoke-b"> ... </b> </p:pipeline> b.xpd: <p:pipeline name="b" ...> ... </p:pipeline> if I then want to include that in a library, I import the same pipeline: lib.xpd <p:pipeline-library> <p:import href="b.xpd"/> ... </p:pipeline-library> (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"/> ... </p:pipeline-library> 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 value: <p:pipeline name="a" ...> <p:import href="b.xpd"/> <b name="invoke-b">...</b> </p:pipeline> <p:pipeline name="a" xmlns:m="http://www.milowski.com/lib" ...> <p:import href="lib.xpd"/> <m:b name="invoke-b">...</m:b> </p:pipeline> 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 considered." Bertrand Russell in a footnote of Principles of Mathematics
Received on Thursday, 15 March 2007 18:28:52 UTC