RE: Submission implementation questions

[Apologies that this reply made it to Aaron but not the list, so I'm posting
again.]

Hi Aaron,

> 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.

Yes.


>  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?

I don't follow how this can be done. @ref can only refer to a node, and
whilst @bind can refer to a nodeset, it will generally operate what's called
the "first node binding rule".


>  Are you only allowed to submit from one
> instance tree per 
> submission?

Yes.


>  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?

This is indeed very vague. The current thinking is that it should be the
instance that the node referred to by @ref comes from. There is an errata
coming soon that will clarify this, and I'm pretty sure that all of the
publicly available implementations do it this way (although couldn't be 100%
certain).


> 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?

The spec is pretty clear on this part, and the instance is not removed - in
fact this is an error:

  For a success response including a body of a non-XML media type,
  when the value of the replace attribute on element submission is
  "instance", nothing in the document is replaced and submit processing
  concludes after dispatching xforms-submit-error.


> 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.

I can only speak for formsPlayer, but we have changed our minds on this
quite a lot! At one stage we always showed the body to the user, which was
useful when debugging SOAP requests over HTTP. We no longer do this, but we
are working on some mechanisms to give the user feedback, although this is
primarily of use when testing a form.

Regards,

Mark


Mark Birbeck
CEO
x-port.net Ltd.

e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/

Download our XForms processor from
http://www.formsPlayer.com/

Received on Wednesday, 6 October 2004 17:16:21 UTC