for-each and peephole (Was: Re: Variables and parameters)

Norm Walsh wrote:
> / Alessandro Vernet <avernet@orbeon.com> was heard to say:
> |    <p:for-each select="$company/department/employee">
> |        <p:step name="give-raise">
> |            <p:input name="employee" select="."/>
> |        </p:step>
> |    </p:for-each>
> 
> No, I'd expect that to be an error. p:for-each iterates over *documents*
> not elements or other nodes.

We *could* overload <p:for-each> to do <p:peephole>: if the XPath 
selects elements then those are turned into documents.

Cheers,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com

Received on Thursday, 25 May 2006 19:50:11 UTC