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

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

From: Jan J Kratky <kratky@us.ibm.com>
Date: Fri, 25 Aug 2006 13:17:03 -0600
To: www-forms@w3.org
Message-ID: <OF57F606C8.3112D4C5-ON852571D5.005BE72D-852571D5.0069EE47@us.ibm.com>
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 

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')"  .....  />

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.


[4] attached example

Received on Friday, 25 August 2006 19:17:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:18 UTC