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

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

From: Lars Oppermann <Lars.Oppermann@Sun.COM>
Date: Fri, 19 Oct 2007 17:01:06 +0200
To: Philip Fennell <Philip.Fennell@bbc.co.uk>
Cc: www-forms@w3.org
Message-id: <4718C6B2.909@sun.com>

Philip Fennell wrote:
> If parameters are added to the URL to 'help' the process of content
> negotiation then things are no longer RESTful because the addition of
> the parameter(s) the URL and we no longer have one URL per resource.
> I think it is a bit harsh to say that providing the ability to specify
> an Accept header for the instance request is 'syntactic sugar'. Why is
> it so much more important for the submission than it is for the intial
> request?

I didn't mean to add a parameter to the get URL in the source attribute but was 
thinking about a new attribute on the instance element which form authers could 
use to control RESTful content negotiation, e.g.:
   <xf:instance src="/object/145-12345" type="text/xml"/>

With dummy instance for the work-around, I was thinking about not specifying a 
URL at all but rather leaving the instance data empty or almost empty at load 
time and only replacing the empty document with the submission that has the 
appropriate accept header specified. An (untested) example would look like this...

   <xf:instance name="I1"><my:empty/></xf:instance>
   <xf:submission action="/object/145-12345"
     name="S1" instance="I1" replace="instance">
   <xf:action ev:event="xforms-ready">
     <xf:send submission="S1"/>

Calling the above mentioned type-attribute syntactic sugar is indeed a bit 
harsh, considering its usefulness in a restful application. The problem that I 
want to avoid is duplicating the submission module into the instance element... 
what if you want to use WSSE headers when loading an initial instance... add 
another attribute... and so forth. Hence I'd argue for using the submission 
workaround (at least for now), starting with a potentially empty instance, 
whenever fine grained control on how an instance is retrieved is needed.

Sun Microsystems                Lars Oppermann <lars.oppermann@sun.com>
Nagelsweg 55                    Software Engineer
20097 Hamburg, Germany          Phone: +49 40 23646 959
http://www.sun.com/             Fax:   +49 40 23646 550
Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1,
D-85551 Kirchheim-Heimstetten, Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering
Received on Friday, 19 October 2007 15:01:27 UTC

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