Is an XForm an application for, or a representation of an instance data?

This is good philosophical stuff but with a practical edge to it:

With regard to XForms and RESTful Web Services, a favourite hobby-horse of mine, I was answering a question on the xsltforms-support mailing list about setting the Accept header for submissions and commented upon a solution that used the same URI to retrieve either the XML representation of the resource or an XForm that referenced the resource. The Accept header was used, via content negotiation, to indicate which representation was required. The implication is that if you use the same URI then the XForm must be regarded as another representation of the resource pointed to by the URI.

My questions are:

1) If you embed an instance data document inside an XForm that provides a view of the document's content, can the resulting XForms document be thought of as a representation of the instance data?

2) If the answer to the (1) is 'yes', then does that still hold true when the instance document is no longer embedded, in-line, but is included by URI reference instead?

3) If you're happy that the answers to (1) and (2) are 'yes' then, given that both the XML representation of the resource and the XForm representation of the resource are nominally application/xml but the later could be application/xhtml+xml, how would you use content negotiation to differentiate between the two requests? You have to take into account the fact that different XForms implementations require different response content-types in order that the form will be processed correctly and also you cannot rule-out that a plain application/xhtml+xml (XHTML) representation may also be required.


The ability to request a representation of a resource that allows the resource to be edited is an interesting one and I'm not sure it has been covered in any great detail if at all. Is the editing application a resource in its own right or a representation of the resource. It's all rather relative and seems to revolve around whether you see the user accessing the resource to edit it or they access an editing application (the XForm) that retrieves the resource.


I'd be interested in your opinions.


Regards

Philip Fennell
Consultant
MarkLogic Corporation
Philip.Fennell@marklogic.com
Phone: +44 (0) 203 402 3619
Mobile:  +44 (0) 7824 830 866
www.marklogic.com<http://www.marklogic.com/>

This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation.

Received on Friday, 22 July 2011 16:27:15 UTC