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

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

From: Klotz, Leigh <Leigh.Klotz@xerox.com>
Date: Fri, 25 Aug 2006 14:12:35 -0700
Message-ID: <E254B0A7E0268949ABFE5EA97B7D0CF4022643A3@usa7061ms01.na.xerox.net>
To: "Jan J Kratky" <kratky@us.ibm.com>, <www-forms@w3.org>
I believe event('headers') should return a <headers> element with
<header/> children.
I thought I had originally written it this way, but either I dropped the
ball or it got changed as part of the reversion to the one-arg event()
function.
Leigh.

________________________________

From: www-forms-request@w3.org [mailto:www-forms-request@w3.org] On
Behalf Of Jan J Kratky
Sent: Friday, August 25, 2006 12:17 PM
To: www-forms@w3.org
Subject: xforms-submit-done/error, event('')



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 
Received on Friday, 25 August 2006 21:19:08 GMT

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