W3C home > Mailing lists > Public > www-forms@w3.org > July 2008

Re: XForms, the xf:header and the HTTP Accept header.

From: Aaron Reed <aaronr@us.ibm.com>
Date: Tue, 29 Jul 2008 13:12:42 -0500
To: www-forms@w3.org
Message-ID: <g6nmmj$c6k$1@ger.gmane.org>


Just a FYI to the WG, Mozilla will 'replace' the value of a request 
header with the value specified in the xf:header if that particular 
header is only capable of containing one value (for example, the content 
type header) but will 'append' the value if the header is capable of 
containing more than one value.

With regards to Philip's argument that the Accept header should only 
contain a single media type and that 'Multiple media types suggest that 
the XForm can accept multiple representations', we must keep in mind 
that the accept header by default is what the browser will accept back 
which is certainly a far greater variety than the xforms plugin can 
accept.  And in most case, I'd argue, the xforms processor has no idea 
what the user is trying to do so to automatically limit the user seems 
the wrong way to go.  Now, in cases where the instance is being replaced 
Philip probably has a point.  But in generic post or get submission 
scenarios it could be that the user might be trying to get out of xforms 
completely if there is a more appropriate type available but is willing 
to take xforms in a pinch.

So unless the user has a way to specify his intent (the way he'd do that 
would be up to this WG), I'd leave it up to the server to serve down the 
appropriate format given the information available to it.


Philip Fennell wrote:
> The Mozilla XForms plug-in now, via nightly builds, has support for the
> xf:header element and its associated attributes and child elements. With
> respect to the HTTP Accept header, the Mozilla implementation appends
> the value in the XForm to the request header whilst, for example, the
> FormsPlayer implementation overwrites the existing header.
> After discussion with Aaron Reed on the dev-tech-xforms mailing list he
> suggests that:
>> Sounds like you have a usecase for the XForms working group to
> consider. 
>> Maybe they could put an attribute on the xf:header that says to
> replace rather than append.
> For my two-penneth worth, after thinking about this for a bit, due to
> the nature of an XForms request and the fact that any data bindings will
> only be valid for a single representation of the requested resource, the
> Accept header should be overridden and therefore only have a single
> media type. Multiple media types suggest that the XForm can accept
> multiple representations which is of course highly unlike. How you
> decide which headers are overridden and which get appended is an
> interesting question.
> Does anyone on this list have an opinion about this?
> Regards
> Philip Fennell
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
Received on Tuesday, 29 July 2008 18:46:08 UTC

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