Re: #foo URI references

At 10:42 2003 09 22 -0500, Paul Grosso wrote:
>At 19:08 2003 09 20 -0400, John Cowan wrote:
>>Roy T. Fielding scripsit:
>>
>>> >The semantic change is to extend #foo semantics to BASE#foo 
>>> >URI-references.
>>> 
>>> That's odd -- I would call that a behavioral change, since the meaning
>>> of the link hasn't changed at all; I only selected one of the ways the
>>> link could be satisfied and made it the standard.  Before it was left
>>> up to the application.
>>
>>Fair enough.  So the special interpretation of "#foo" in the resource
>>denoted by "http://www.example.com/blargh" is extended to "blargh#foo"
>>and "http://www.example.com/blargh#foo" as well.
>>
>>But it seems to me that (for good or ill) this also means that if a
>>base URI is available, say "http://www.example.com/stat/blargh", then
>>"#foo" now means "http://www.example.com/stat/blargh#foo".
>>
>>Is this a correct reading of 2396 bis?
>
>
>And if John is reading it correctly (he is reading it as I did),
>then this is the crux of my problem with it.


I've reread
http://cvs.apache.org/viewcvs.cgi/*checkout*/ietf-uri/rev-2002/rfc2396bis.html?rev=1.64#same-document
but it seems that my studying the text (and JohnC's studying of it)
isn't necessarily sufficient to answer my question which is as follows.

In RFC 2396, it makes clear that:

      If the path component is empty and the scheme, authority, and
      query components are undefined, then it is a reference to the
      current document and we are done. 

Given either the following document at http://www.example.org/doc.xml:

<doc xml:base="http://www.example.com/stat/blargh">
  <para href="#foo">xxx</para>
  <para id="foo">yyy</para>
</doc>

or the following document at http://www.example.org/doc.html:

<html>
<head>
<title>t</title>
<base href="http://www.example.com/stat/blargh">
</head>
<body>
<p><a href="#foo">xxx</a></p>
<p><a name="foo">yyy</a></p>
</body>
</html>

the href in either case points to the element in the same document
containing yyy.

Some readings of 2396bis interpret it to be saying that the href above
points to http://www.example.com/stat/doc.xml#foo (or, in the html case,
http://www.example.com/stat/doc.html#foo) which does not necessarily 
exist and is certainly not my intended target.

Is this significant change in meaning (and behavior for a variety of 
deployed tools) the intended interpretation of 2396bis?

paul

Received on Thursday, 29 January 2004 13:50:38 UTC