W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > July 2006

Re: p:for-each

From: Alessandro Vernet <avernet@orbeon.com>
Date: Wed, 26 Jul 2006 16:19:46 -0700
Message-ID: <4828ceec0607261619u3f08bcabva80c52b53bcd6fba@mail.gmail.com>
To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:48 GMT