9 messages in org.w3.xproc-devRe: Difference between 'contained st...
FromSent OnAttachments
James FullerNov 18, 2008 12:50 pm 
Norman WalshNov 18, 2008 12:53 pm 
Henry S. ThompsonNov 19, 2008 3:50 am 
mozerNov 19, 2008 5:10 am 
mozerNov 19, 2008 5:14 am 
Norman WalshNov 19, 2008 5:44 am 
David A. LeeNov 22, 2008 6:38 am 
Jeni TennisonNov 22, 2008 7:45 am 
David A. LeeNov 22, 2008 8:37 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Difference between 'contained steps' and 'subpipeline'Actions...
From:Jeni Tennison (je@jenitennison.com)
Date:Nov 22, 2008 7:45:28 am
List:org.w3.xproc-dev

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