RE: Submission implementation questions

Hi Aaron,

Actually, I didn't think the spec was unclear in its use of 'body.'  It has to be the http body and not the <body> tag of an HTML page in the response because the response is unlikely to be HTML.

Also, the spec distinguishes behavior for body vs. no body, but it does not discuss the 'empty' body problem you are considering because in this case there is a body, so the content type of the body is used to determine what is going on in the case of replace instance.  If the content type associated with the body is not an XML media type, then a submit error occurs (11.1.5 3rd bullet).  One of my comments yesterday was simply trying to say that if the content type does indicate an XML media type, but the data returned is not actually XML, then 11.1.5 2nd bullet says the data is processed as if you had an <instance> with an src, so I would expect something along the lines of a link exception because the data was supposed to be XML but isn't.

Of note, in 1.1 I believe we are adding another exception type to allow you to distinguish between failure to traverse a link versus failure to parse the resultant data as XML.  It'll still be fatal error, but the different event can facilitate identification of the exact cause of a failure.

Anyway, at the end of your new message (below) I think you switched tracks and started looking at replace all, and 11.1.5 1st bullet covers that case.  The document is replaced with the returned body. Clearly, the user agent (web browser) must be involved in the replacement, and it decides what to do with the new document.  So, for example, if a jpeg is returned, then the document bearing the XForms elements is replaced with a jpeg.



<aaron>
Thanks for your replies.  They were really helpful.  Still have one question,
though.  How do we determine what the "body" is in a response?  In section 11.1
item #5 of the spec, when it refers to "body", does it mean http body?  From
what I can tell, all 1xx, 204 and 304 responses don't have a body and all other
responses do.  Is this the "body" that is being referred to?  So if I have a
replace="all" attribute on a submission and I get back an http response of 200
with an empty body, should we handle that just like a browser and leave the form
showing?  If the http response body is a jpeg, show the jpeg?  Since the spec
doesn't spell out that it means the http body, we just want to make sure that is
what is being referenced and not something like HTML <body>.

Thanks again for your help,
--Aaron
</aaron>

Received on Thursday, 7 October 2004 18:57:10 UTC