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: Thu, 20 Jul 2006 00:09:01 -0700
Message-ID: <4828ceec0607200009t246cdab8g6d7da4dae1c98624@mail.gmail.com>
To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>

On 7/19/06, Norman Walsh <Norman.Walsh@sun.com> wrote:
> A for-each looks like:
>
>   for-each := ($over, $select?, $label, with-output, {body})

Norm,

In your proposed syntax, the 3 attributes related to the input are on
<p:for-each>, while the attributes related the output are on an inner
element <p:with-output>.

I think that having attributes related to the input directly on the
<p:for-each> but having attributes related to the output on an inner
element is somewhat inconsistent. So I suggest we use 2 inner
elements.

Also, just as we like to have a <p:with-output> which has a different
element name than the pipeline <p:output>, I suggest we used different
element names here: <p:for-each-input> and <p:for-each-output>. This
makes it clear that a <p:for-each-input> is an input, but not exactly
like the <p:input> and <p:with-input> (all those elements also accept
different set of attributes).

That gives:

<p:for-each>
   <p:for-each-input from="documents-to-import"
           select="/xpath"
           label="one-document"/>
   <p:for-each-output label="sequence-of-errors"
           from="error-for-this-document"/>

Alex
-- 
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/
Received on Thursday, 20 July 2006 07:09:07 GMT

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