Is an XForm an application for, or a representation of an instance data?
Philip Fennell <[email protected]> Fri, 22 Jul 2011 09:26:47 -0700
| Newsgroups | gmane.comp.web.xforms |
|---|---|
| Message-ID | <[email protected]> |
--_000_D20C296D14127D4EBD176AD949D8A75A680E04CAEXCHGBEmarklogi_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 abou= t setting the Accept header for submissions and commented upon a solution t= hat used the same URI to retrieve either the XML representation of the reso= urce 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 regarde= d 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 v= iew 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 t= he 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 th= at both the XML representation of the resource and the XForm representation= of the resource are nominally application/xml but the later could be appli= cation/xhtml+xml, how would you use content negotiation to differentiate be= tween the two requests? You have to take into account the fact that differe= nt XForms implementations require different response content-types in order= that the form will be processed correctly and also you cannot rule-out tha= t a plain application/xhtml+xml (XHTML) representation may also be required= . The ability to request a representation of a resource that allows the resou= rce 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 it= s own right or a representation of the resource. It's all rather relative a= nd 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 [email protected] 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 informat= ion is intended solely for the use of the individual to whom it is addresse= d. Any review, disclosure, copying, distribution, or use of this e-mail com= munication by others is strictly prohibited. If you are not the intended re= cipient, please notify us immediately by returning this message to the send= er and delete all copies. Thank you for your cooperation. --_000_D20C296D14127D4EBD176AD949D8A75A680E04CAEXCHGBEmarklogi_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"= > <meta name=3D"Generator" content=3D"Microsoft Exchange Server"> <!-- converted from rtf --> <style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left:= #800000 2px solid; } --></style> </head> <body> <font face=3D"Calibri, sans-serif" size=3D"2"> <div>This is good philosophical stuff but with a practical edge to it:</div= > <div> </div> <div>With regard to XForms and RESTful Web Services, a favourite hobby-hors= e of mine, I was answering a question on the xsltforms-support mailing list= about setting the Accept header for submissions and commented upon a solut= ion that used the same URI to retrieve either the XML representation of the resource or an XForm that referenced t= he resource. The Accept header was used, via content negotiation, to indica= te which representation was required. The implication is that if you use th= e same URI then the XForm must be regarded as another representation of the resource pointed to by the URI.</= div> <div> </div> <div>My questions are:</div> <div> </div> <div>1) If you embed an instance data document inside an XForm that provide= s a view of the document’s content, can the resulting XForms document= be thought of as a representation of the instance data?</div> <div> </div> <div>2) If the answer to the (1) is 'yes', then does that still hold true w= hen the instance document is no longer embedded, in-line, but is included b= y URI reference instead?</div> <div> </div> <div>3) If you’re happy that the answers to (1) and (2) are 'yes' the= n, given that both the XML representation of the resource and the XForm rep= resentation of the resource are nominally application/xml but the later cou= ld 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 re= quire different response content-types in order that the form will be proce= ssed correctly and also you cannot rule-out that a plain application/xhtml+xml (XHTML) representation may = also be required.</div> <div> </div> <div> </div> <div>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 b= een covered in any great detail if at all. Is the editing application a res= ource 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. </div> <div> </div> <div> </div> <div>I’d be interested in your opinions.</div> <div> </div> <div> </div> <div>Regards</div> <div> </div> <div>Philip Fennell<br> Consultant<br> MarkLogic Corporation<br> [email protected]<br> Phone: +44 (0) 203 402 3619<br> Mobile: +44 (0) 7824 830 866<br> <a href=3D"http://www.marklogic.com/"><font color=3D"#0000FF"><u>www.marklo= gic.com</u></font></a><br> <br> <font size=3D"2">This e-mail and any accompanying attachments are confident= ial. The information is intended solely for the use of the individual to wh= om it is addressed. Any review, disclosure, copying, distribution, or use o= f this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notif= y us immediately by returning this message to the sender and delete all cop= ies. Thank you for your cooperation.</font></div> <div> </div> <div> </div> <div> </div> <div> </div> </font> </body> </html> --_000_D20C296D14127D4EBD176AD949D8A75A680E04CAEXCHGBEmarklogi_--