W3C home > Mailing lists > Public > www-forms@w3.org > October 2004

RE: Submission implementation questions

From: John Boyer <JBoyer@PureEdge.com>
Date: Wed, 6 Oct 2004 09:57:48 -0700
Message-ID: <7874BFCCD289A645B5CE3935769F0B52C71F86@tigger.pureedge.com>
To: "Aaron Reed" <mozillaxforms@yahoo.com>, <www-forms@w3.org>

Hi Aaron,

1) Because it is a single-node binding, tThe first-node rule is used to obtain the first node if the ref (or bind) refers to multiple nodes.  

The instance that gets replaced is the one from which the submitted instance is drawn (although we are adding to 1.1 the ability to target another instance than the source as the one to replace).

Also, regarding instance replacement, I believe we have an erratum coming to say that instance replacement is followed by rebuild, recalculate, revalidate, refresh and not model-construct.

We have another erratum coming which says that validation of the instance data should occur over the instance subtree pruned of non-relevant nodes.

2) If the body section is there, then it is used.  If the data doesn't parse into an XML document, then you get the same behavior as if you had attempted to read the same file using instance with an src attribute.  So, I'd expect a link exception.  This is a bit drastic since processing stops with a fatal error, but the fact remains that this was a success case, so the application designer does have some responsibility to return usable data if he wrote replace="instance".  If he doesn't want to use the returned data, write replace="none".

3) To show a problem to the user, the form author writes an xforms-submit-error.  We are working in 1.1 to provide more event context information to the event handler.

Hope this helps a bit.

Cheers,
John Boyer




-----Original Message-----
From: Aaron Reed [mailto:mozillaxforms@yahoo.com]
Sent: Tuesday, October 05, 2004 9:47 AM
To: www-forms@w3.org
Subject: Submission implementation questions



Hi,

Ok, we've hit some gray areas of the spec and would like some clarifications on
how to best handle submission in these edge cases.

1)  The submission element can have a ref attribute or a bind attribute.  The
purpose according to the spec is to allow for the submission of a portion of 
the instance data.  What I'm wondering is, what happens if you have multiple 
instance trees in a model and the ref points at multiple nodes in multiple 
instance trees?  Are you only allowed to submit from one instance tree per 
submission?  What if it also contains the replace="instance" value?  Which 
instance does it replace?  All instance trees that were part of the submission 
or just the first instance in document order that was part of the submission?

2)  In 11.1 (xforms-submit event), specifically the default behavior as laid out
in item #5.  It mentions often in this section of the spec the "body" of the 
response?  Exactly what are we supposed to look for in the response to determine 
the body of the response?  Or what has to be absent to determine that there is 
NO body in the response?  For example, if the http response is 200, there is a 
body, but it could be empty.  Then what happens to the instance?  Is it removed 
if there was a replace="instance" attribute is set?

3)  Also the spec mentions, "For an error response nothing in the document is 
replaced, and submit processing concludes after dispatching
xforms-submit-error."  Is it common amongst the different implementations that 
the error response body is still somehow shown to the user, like in an error 
popup or something?  Currently in HTML forms, the user will see the errors 
generated by the servers.

We'd appreciate any input that we can get.

Thanks,
--Aaron
Received on Wednesday, 6 October 2004 16:58:23 GMT

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