Re: Language construct syntax

Norm Walsh wrote:
> / Jeni Tennison <jeni@jenitennison.com> was heard to say:
> | For-each, choose, viewport (and group) are all special because if we
> | tried to describe them as components, we would need to pass in pipelines
> | as one or more of the inputs. I'm going to use pipeline="yes" to
> | identify such inputs in the following discussion.
> 
> What you've outlined is certainly logical, but I just don't think of
> the "body" of these constructs as pipelines passed as an input. And
> I'm really reluctant to start describing them that way.

I was describing them as components in order to identify a syntax that 
was consistent across language constructs and consistent with how steps 
are normally called. I wasn't arguing that we should describe them in 
that way in a spec.

Regardless:

0. The syntax we have for <group> and <choose> is fine as it is.

1. The documents input to for-each should be specified by 
source/href/select attributes on the <for-each> element, not on the 
<input>/<declare-input> element that declares the (single) document 
input for the nested pipeline.

2. The document input to viewport should be specified by 
source/href/select attributes on the <viewport> element, not on a 
<input>/<declare-input> element that declares the (single) document 
input for the nested pipeline.

3. On <viewport>, the XPath that selects the subtrees to be processed 
should be specified by a 'subtrees' (or similarly named) attribute, 
rather than a 'select' attribute (which conflicts with the 'select' 
attribute that in all other cases selects the document that forms the 
input for a process).

4. We need to indicate the restrictions on the inputs/outputs in the 
nested pipelines of <for-each> and <viewport>, namely that they both 
must have one primary input that accepts a single document, and that 
<viewport> must have one primary output that generates a single document.

Cheers,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com

Received on Wednesday, 16 August 2006 15:19:41 UTC