W3C home > Mailing lists > Public > www-forms@w3.org > July 2011

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

From: C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>
Date: Sat, 23 Jul 2011 12:03:31 -0600
Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, "www-forms@w3.org" <www-forms@w3.org>
Message-Id: <9412F285-8C09-4FB5-A199-6C4530E64DE3@blackmesatech.com>
To: Philip Fennell <Philip.Fennell@marklogic.com>

On Jul 22, 2011, at 10:26 AM, Philip Fennell wrote:

> 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?

There is a sense in which this question appears to be one of human psychology.
Is it possible for someone to think of a form to edit X as being a representation of
X?  That's an empirical question to which the answer is pretty clearly 'yes'.

Is it a reasonable way of thinking?  Is it, in particular, consistent with the way
Web architecture defines 'resource'?

As far as I can tell, Web architecture does not define 'resource' at all, and
all the discussions of Web architecture I've seen clearly prefer to risk 
obscurity and confusion rather than risk unintentionally limiting what can be
thought of as a resource.

So as far as I can see, speaking only for myself, yes, it's perfectly consistent
with Web architecture, both in the sense of not contradicting it (there not being
much to contradict) and in the sense of appearing to be a perfectly legitimate
exercise of the resource owner's responsibility to decide what a resource is
and what counts as a representation of it. 

I think it's also consistent with Web architecture to decide to give X and a form
to edit X different URIs -- the resource owner appears to be the one who has 
the right and responsibility to decide.

>  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?

I think so.  Or perhaps I should say I think it should:  making a question of
resource identity depend on whether certain content is inline or present by
reference seems to place more weight on network location than is a good

> 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.

Really good question, to which I for one don't have a good answer.  Some
very smart people I know have told me content negotiation is the right answer
for a lot of things, so my instinct is to say it sounds promising.  But (a) they
have also complained bitterly that conneg is not well implemented or
understood, so I have never been sure it was possible to make it work without
more effort than normal humans can expect to expend, and (b) there is
always the possibility that conneg appears to be the right answer only because
one cannot currently use it very well, and that concrete experience using it 
will reveal that it works well as an answer for some things and not for others.

> 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.

Agreed on both counts.

> Is the editing application a resource in its own right or a representation of the resource.

That's a Web Architecture koan if I've ever seen one.

> 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 think I agree.

> Iíd be interested in your opinions.

For what it's worth, then, here they are.


Michael Sperberg-McQueen

* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com 
* http://cmsmcq.com/mib                 
* http://balisage.net
Received on Saturday, 23 July 2011 18:04:30 UTC

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