W3C home > Mailing lists > Public > www-forms@w3.org > August 2006

Re: xforms-submit-done/error, event('')

From: Ulrich Nicolas Lissť <u.n.l@gmx.net>
Date: Fri, 25 Aug 2006 22:27:45 +0200
Message-ID: <44EF5D41.1070900@gmx.net>
To: Jan J Kratky <kratky@us.ibm.com>
CC: www-forms@w3.org

Jan,

you could try to iterate the "event('headers')" nodeset like described 
in http://www.w3.org/TR/xforms11/#iterated-actions

Rgards,
Uli.

Jan J Kratky wrote:
> 
> As I look at the "headers" event-context property of the 
> xforms-submit-error [1] and xforms-submit-done [2] events in the latest 
> 1.1 draft, I have this question: how might one operate on the returned 
> nodeset to, for example, display the values for all returned headers in 
> the form itself? (Think of an example with submission@replace="none" or 
> replace="instance").
> 
> Since the return value of event('headers') will be a node-set containing 
> 0 to N elements named 'header', I do not see a way of inserting all of 
> these into an instance (perhaps to then be referred to by an output 
> within a repeat -- and, who knows, someone might come up with other 
> reasons to place all the header values into an instance). insert@context 
> is promising [3], but it uses the "first node rule", permitting 
> insertion of only one node at a time, and I don't see any way yet of 
> iterating over a node-set in this situation. Unless, of course, I am 
> missing some obvious way to accomplish this, which always is possible.
> 
> Can anyone come up with a 1.1 source example of how to do this? If not, 
> would it make sense for event('headers') to return a node-set of size 1, 
> with the single node being an element named "headers", with 0..N child 
> elements named "header"? That would permit markup like the below to 
> cause all the header data to be inserted into an instance...
> 
> <xforms:action ev:event="xforms-submit">
>       <xforms:insert origin="event('headers')"  .....  />
> </xforms:action
> 
> I've attached an example document that shows what I'm after.
> 
> Also, are properties for an event that triggers an xforms:action even 
> available to the actions contained by the xforms:action as well? An 
> answer to that question seems to be a prerequisite for the rest of the 
> discussion. I am assuming that they are, and that they are in scope for 
> everything contained within the element that originally handles the 
> event, but the spec could be more explicit about this.
> 
> 
> Thanks,
> Jan
> 
> 
> References:
> [1] 
> http://www.w3.org/MarkUp/Forms/Group/Drafts/1.1/thinspec/index-diff.html#evt-submitError 
> 
> [2] 
> http://www.w3.org/MarkUp/Forms/Group/Drafts/1.1/thinspec/index-diff.html#event-info-xforms-submit-done 
> 
> [3] 
> http://www.w3.org/MarkUp/Forms/Group/Drafts/1.1/thinspec/index-diff.html#insert-action 
> 
> [4] attached example
> 


-- 
Ulrich Nicolas Lissť
Received on Friday, 25 August 2006 20:28:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:06 GMT