Re: p:for-each

On 7/26/06, Norman Walsh <Norman.Walsh@sun.com> wrote:
> Given that there must be exactly one, is there a compelling reason to
> do this with a p:declare-input as opposed to simply allowing those
> attributes on the p:for-each element?

Norm,

I guess there is no compelling reason to keep a separate input on the
<p:for-each>. So I removed it in [1]. However, I am not sure about
about using the same <p:declare-output> we have on the pipeline. On
the pipeline it looks like:

<p:declare-output port="..." ref="..."/>

But on the <p:for-each> it would make more sense to use 'name' instead
of 'port', so every 'ref' references a 'name'. To avoid the confusion,
we can keep a different name:

<p:for-each-output name="..." ref="..."/>

The situation is the same for the output of <p:choose> where could have:

<p:choose-output name="..." ref="..."/>

[1] http://avernet.googlepages.com/xproc-syntax

> | It's a familiar thing to XPath 2.0 users ;)
> | for $i in (a,b,c), $j in (x,y) return ($i,$j)
>
> I avoid 'for'. Ought not to have been in XPath 2.0 dang it. :-)

One undeniable benefit of the 'for' in XPath 2.0 is that it makes for
heated debates that quite enjoyable over beers :).

Alex
-- 
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/

Received on Wednesday, 26 July 2006 23:20:02 UTC