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

Re: p:for-each

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Thu, 27 Jul 2006 10:45:44 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <87irljt8br.fsf@nwalsh.com>
/ Norman Walsh <Norman.Walsh@Sun.COM> was heard to say:
| I would really like to avoid having a whole bunch of different flavors
| of input/output or declare-input/declare-output if we can avoid it.

This, for example, looks entirely reasonable to me:

<p:for-each name="loop">
  <p:declare-input port="input" ref="#some/input" select="//chapter"/>
  <p:declare-output port="result"/>

  <p:step kind="foobar">
    <p:input port="input" ref="#loop/input"/>
    <p:output port="result" ref="#loop/result"/>

I'd say that in a for-each, there must be exactly one declare-input
and in a for-each (and only a for-each), it may have a select

If the select is given, then what appears on the declared input port
is all the nodes that match that select expression in all the
documents in the referenced input.

If the select isn't given, then what appears on the declared input
port is each document in the referenced input.

                                        Be seeing you,

Norman Walsh
XML Standards Architect
Sun Microsystems, Inc.

Received on Thursday, 27 July 2006 14:45:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:40 UTC