Re: action/@iterate

Hi Leigh,

The iteration I referred to was with the @while attribute on action.

The challenge with @iterate is not unlike the challenges we discussed 
today for proposed functions like xslt(), which is that we want new 
language features to work well with existing language features.  Not just 
for the dominant use cases where we expect the feature to be most used, 
but in the edge cases too.

This is where we had difficulty with @iterate previously.  Not to say the 
issues can't be solved, just that we would have to spend the time ensuring 
they are solved and specifying those solutions.  The main issue is that 
@iterate produces a nodeset that spans beyond the lifetime of the actions 
within the loop body, whereas @while produces an ephemeral result that we 
use and forget.  A loop based on while places no expectations *on the 
XForms processor* regarding maintenance of state across data mutations 
performed by the loop body, whereas @iterate does.

Put simply, if you have a 20-node nodeset produced by @iterate, and then 
inside the loop body, you start deleting nodes that have not yet been 
processed, what is supposed to happen?  Similarly, if the loop body adds 
nodes that the @iterate would match, do they get added to the iteration? 
Would an iteration be expected to finish if it invokes a replace all 
submission?  I haven't fully poked at this, so maybe there are other 

John M. Boyer, Ph.D.
STSM, Lotus Forms
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab

Blog RSS feed:

"Klotz, Leigh" <>
05/12/2010 01:07 PM

In today's teleconference, I noted that one of the use cases for doc() in 
xquery used with XForms might be to iterate over a set of resources and 
load them, as it's difficult to do in XForms.  John reported that it isn't 
difficult, only a bit of typing.

Erik mentioned that we had originally proposed @iterate for XForms 1.1, 
but it got dropped.

Here is Orbeon's documentation for it:

I believe we should consider @iterate for XForms 1.2.


Received on Wednesday, 12 May 2010 20:29:56 UTC