Re: p:for-each

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 UTC