W3C home > Mailing lists > Public > www-forms@w3.org > September 2007

XForms:instance requests, the HTTP Accept header and RESTful Web Services...

From: Philip Fennell <Philip.Fennell@bbc.co.uk>
Date: Fri, 28 Sep 2007 09:11:12 +0100
Message-ID: <FBFAE0E0B37B4148AF77509764D4BC20031925CA@bbcxues11.national.core.bbc.co.uk>
To: <dev-tech-xforms@lists.mozilla.org>, <www-forms@w3.org>

I'm working on a XForms demo that combines XML content editing and
RESTful Web Services.

Whilst looking at the HTTP request headers sent by an xforms:instance
request by the Mozilla XForms plug-in I noticed that the server gets the
same 'Accept' header whether it comes from a hyper-link in the host
XHTML page or from an XForms instance request:

<a href="objects/0901047880012b9b" title="example xhtml content"
type="text/html">...</a>

 or

<xforms:instance xmlns="" id="content"
src="../objects/0901047880012b9b"/>

 sends

text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plai
n;q=0.8,image/png,*/*;q=0.5


Given that XForms is designed for editing well-formed XML, should it not
be the case that an XForms implementation should declare to the server
that it only accepts XML. Now I'd admit that just sending 'text/xml' in
the 'Accept' header is probably too narrow, but something along these
lines would allow a server that uses pre-emptive content negotiation to
return an XML representation of a concept to the XForm and an XHTML
(preview) representation to a hyper-link from the host XHTML page.
Otherwise, I cannot see how XForms can operate within a RESTful Web
Service where content negotiation is used to serve appropriate
representations from opaque URLs.



Regards

Philip Fennell
>XSLT Developer (Content Management Culture)
>
>BBC Future Media & Technology
>Media Village, 201 Wood Lane London W12 7TP 
>BC4 C4, Broadcast Centre
>
>T:	0208 0085318
>

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 Friday, 28 September 2007 19:19:30 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 10 December 2014 20:11:58 UTC