Re: Are URI-References bound to resources?

Roy T. Fielding <fielding@ebuilt.com> wrote:

>> The interpretation he's asking about says that
>>   http://example.org/q#foo
>>     and
>>   http://example.org/q#bar
>> identify the same resource. Are you sure that's correct?
>> i.e. can you justify that from the text of RFC2396?
>> As far as I can tell, RFC2396 doesn't say what resource
>> either of them identifies; it only tells you that
>> yes, they identify the same resource after you remove
>> the #fragid. Duh.
> 
> The resource identifier is before the fragment.  The fragment identifies
> a subset of the representation retrieved after a GET of the resource.
> It isn't possible to "access" the fragment on its own, and hence it is
> not itself a resource until someone provides another URI that that
> has the semantics of mapping to that representation as a resource
> (i.e., an indirect reference).

While Roy provides a very good logical argument why the Web architecture
would be seriously messed up if we allowed fragments to be resources, to be
clear, the spec itself says:

<q cite="http://www.ietf.org/rfc/rfc2396.txt">
   The term "URI-reference" is used here to denote the common usage of a
   resource identifier.  A URI reference may be absolute or relative,
   and may have additional information attached in the form of a
   fragment identifier.  However, "the URI" that results from such a
   reference includes only the absolute URI after the fragment
   identifier (if any) is removed and after any relative URI is resolved
   to its absolute form.  Although it is possible to limit the
   discussion of URI syntax and semantics to that of the absolute
   result, most usage of URI is within general URI references, and it is
   impossible to obtain the URI from such a reference without also
   parsing the fragment and resolving the relative form.
</q>

While it's true that it isn't very clear on exactly what a URI-ref
identifies, it strongly implies that it isn't bound to its own resource.

-- 
[ Aaron Swartz | me@aaronsw.com | http://www.aaronsw.com ]

Received on Sunday, 13 May 2001 02:01:35 UTC