RE: action/@iterate

Yes, we should add @iterate to the list of things to look at when we deal with non-instance nodes in XPath 2.0 and XQuery and XSLT.
I'm convinced that XForms integrations with these technologies are important.  Just as not every XForms processor will integrate with XHTML (your esteemed XFDL being a prime example, and ODF being another), not every XForms processor will integrate with XQuery or XSLT.  However, for those that do, having a consistent position on non-instance nodes is important, as you, Erik, and Nick have all identified.  Once we get a few more use cases under study, we will, I hope, be able to come to a resolution on how to handle them in XForms+X* integrations where they crop up, without having a deleterious effect on XForms integrations where they do not.
 
Leigh.

________________________________

From: John Boyer [mailto:boyerj@ca.ibm.com] 
Sent: Wednesday, May 12, 2010 1:29 PM
To: Klotz, Leigh
Cc: public-forms@w3.org
Subject: 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 issues... 

John M. Boyer, Ph.D.
STSM, Lotus Forms
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com  

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer <http://www.ibm.com/developerworks/blogs/page/JohnBoyer> 
Blog RSS feed: http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw <http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw> 





From: 	"Klotz, Leigh" <Leigh.Klotz@xerox.com> 
To: 	<public-forms@w3.org> 
Date: 	05/12/2010 01:07 PM 
Subject: 	action/@iterate

________________________________




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:
http://www.orbeon.com/orbeon/doc/reference-xforms-extensions#exforms-iterate <http://www.orbeon.com/orbeon/doc/reference-xforms-extensions#exforms-iterate> 

I believe we should consider @iterate for XForms 1.2.

Leigh.

Received on Wednesday, 12 May 2010 21:36:06 UTC