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

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

From: John Boyer <boyerj@ca.ibm.com>
Date: Fri, 19 Oct 2007 09:54:41 -0700
To: Lars Oppermann <Lars.Oppermann@Sun.COM>
Cc: Philip Fennell <Philip.Fennell@bbc.co.uk>, www-forms@w3.org, www-forms-request@w3.org
Message-ID: <OF4A61704B.1BBD9B9D-ON88257379.005C6C2A-88257379.005CE7DC@ca.ibm.com>
Perhaps another thing we could consider for the future is putting a 
submission attribute on instance.
This would allow us to avoid creating a second highly configurable 
communication object.

The src and resource attributes on instance are designed to provide  a 
very lightweight syntax for doing easy things.
But our intent was to provide RESTful capabilities through submission.  In 
XForms 1.1, this means you would have to write

<instance id="X">

<send ev:event="xforms-model-construct-done" submission="S"/>

<submission id="S" replace="instance" instance="X" resource="URL" 
serialization="none" ...>
    <header> ... set up accept header here ...</header>

In the future, the following

<instance submission="S"/>

could be  a shorthand for the XForms 1.1 syntax.

John M. Boyer, Ph.D.
STSM: Lotus Forms Architect and Researcher
Chair, W3C Forms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer

Lars Oppermann <Lars.Oppermann@Sun.COM> 
Sent by: www-forms-request@w3.org
10/19/2007 08:01 AM

Philip Fennell <Philip.Fennell@bbc.co.uk>
Re: XForms:instance requests,  the HTTP Accept header and RESTful Web 

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 
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 
time and only replacing the empty document with the submission that has 
appropriate accept header specified. An (untested) example would look like 

   <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 
what if you want to use WSSE headers when loading an initial instance... 
another attribute... and so forth. Hence I'd argue for using the 
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 16:56:16 UTC

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