- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Sat, 22 Nov 2008 15:45:51 +0000
- To: "David A. Lee" <dlee@calldei.com>
- Cc: "XProc Dev" <xproc-dev@w3.org>
David, On 22 Nov 2008, at 14:39, David A. Lee wrote: > I'm a little (ok a LOT) confused between the difference of > 'contained steps' and 'subpipeline' > > E.g in the spec in this part: > 4.1 > > <p:pipeline > name? = NCName > type? = QName > psvi-required? = boolean > xpath-version? = string > exclude-inline-prefixes? = prefix list> > (p:input | > p:output | > p:option | > p:log | > p:serialization)*, > (p:declare-step | > p:import)*, > subpipeline > </p:pipeline> > > > What's the difference between the sequence of p:declare-step and > subpipeline ? It's the same as the difference between the declaration of a function in your programming language of choice, and the code that makes up the body of a function. A <p:declare-step> is a declaration of a pipeline that you can later invoke within the subpipeline. The subpipeline is the sequence of steps that is performed when the pipeline is called. > What really confuses me is this comment : from 2.1 > ------ > Note > User-defined pipelines (identified with pfx:user-pipeline in the > preceding syntax summary) are atomic. A pipeline declaration may > contain a subpipeline, but the invocation of that pipeline does not. > > ------ > > So that last sentance ... is it saying the "subpipeline" in the > above p:pipeline is not executed ? > > If so what is done with it ? > This is the same as asking whether the code within a function definition is executed. It is executed, but only when the function (pipeline) is invoked. The note you quote is saying that you can't create user-defined pipelines that hold subpipelines *when you invoke them*, so you can't create user-defined pipelines that work like the compound steps <p:for-each>, <p:viewport>, <p:choose> and so on. But you can create user-defined pipelines that work like the various atomic steps such as <p:replace> or <p:xslt>. Does that make any more sense? Jeni -- Jeni Tennison http://www.jenitennison.com
Received on Saturday, 22 November 2008 15:46:26 UTC