W3C home > Mailing lists > Public > uri@w3.org > June 2003

Re: #foo URI references

From: Graham Klyne <GK@ninebynine.org>
Date: Fri, 27 Jun 2003 18:42:56 +0100
Message-Id: <5.1.0.14.2.20030627183221.03204ec8@127.0.0.1>
To: Paul Grosso <pgrosso@arbortext.com>, uri@w3.org

In the opposite direction to your concerns, I find that the old 
same-document reference approach is problematic because there is *no way* 
to specify a fragment relative to the current base URI without also 
specifying part of the base URI.  (See also my comments at: 
http://www.apache.org/~fielding/uri/rev-2002/issues.html#017-rdf-fragment)

I think the underlying problem is that this bit of syntax (i.e. bare #frag) 
is overloaded, and the most useful choice of functionality varies with the 
use.  Which suggests that a fix to satisfy everybody would require more 
syntax, but I don't know if that's a good idea, or even possible.

#g
--

At 14:09 25/06/03 -0500, Paul Grosso wrote:

>Apologies for entering late, but I've just realized that the
>latest 2396bis is planning to change the meaning that 2396 gives
>to URI references that consist only of a fragment identifier.
>
>I'm surprised to hear this is being considered, and I think it
>is a mistake.
>
>As I'm sure most of you 2396-experts know, from 2396:
>
>    4.2. Same-document References
>
>    A URI reference that does not contain a URI is a reference to the
>    current document.
>
>    . . .
>
>    5.2. Resolving Relative References to Absolute Form
>
>    . . .
>
>    2) 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.
>
>    . . .
>
>    C.1.  Normal Examples
>
>    #s            =  (current document)#s
>
>
>However, in draft-fielding-uri-rfc2396bis-03, the text in
>4.4  Same-document Reference has been changed in this regard.
>
>The pseudo-code in 5.2  Obtaining the Referenced URI includes:
>
>  if (R.path == "") then
>             T.path = Base.path;
>
>And in 5.4.1  Normal Examples, there is:
>
>   "#s"            =  "http://a/b/c/d;p?q#s"
>
>
>The fact that several browsers have done this wrong for a long time
>has been very annoying, but is not a good reason to remove this
>needed feature.  Some browsers and other tools do follow 2396
>properly in this regard.
>
>In fact, this specific issue was discussed in the development of
>the XML Base Recommendation [1].  When we made normative reference
>to RFC 2396 in XML Base, we did this with the clear understanding
>that we were defining XML Base so that a URI reference consisting
>solely of a fragment identifier would NOT be affected by XML Base.
>
>So changing 2396bis in this respect would mean that 2396bis would
>then be out of sync with XML Base.
>
>Use case
>--------
>I download one part of a multipart W3C spec to my laptop so that I
>can work on a new version of it.  This document has made intelligent
>use of relative URIs to make references to the other parts (and
>graphics) that make up this spec.
>
>I don't want to download the whole set of other parts and graphics
>while I work on this part, so I set xml:base appropriately on the
>document element so that all the relative URIs to the other parts
>and graphics work.
>
>Of course, there are lots of relative URIs that are only fragment
>identifiers within this document.  This includes links from
>citation elements in the text down to the corresponding bibliography
>entry, links from tokens in various grammar productions over to another
>production within the same document, links from defined terms to it
>definition within this document, etc.
>
>I like the fact that, when I click on a link that resolves to
>another part, I am taken to that other part which is why I want
>to use xml:base.  But I sure don't want to click on a link that's
>supposed to take me from a defined term to its definition in the
>previous paragraph and find myself going to another (older version
>of the) document.  And if I'm offline and trying to work on this
>document, I'm going to be even more inconvenienced when I click
>on what I believe to be an intra-document link if it turns out
>instead to refer to another resource that I cannot currently access.
>
>If URI references of the form #foo are no longer going to be same
>document references, then I see no way to have the citation,
>term/definition, or other intra-document links work in the presence
>of xml:base.
>
>Basically, this change would make use of XML Base (if we changed XML Base
>to refer to the new version of 2396) difficult to the point of becoming
>almost useless in documents that made much use of intra-document links.
>
>paul
>
>[1] http://www.w3.org/TR/xmlbase/

-------------------
Graham Klyne
<GK@NineByNine.org>
PGP: 0FAA 69FF C083 000B A2E9  A131 01B9 1C7A DBCA CB5E
Received on Friday, 27 June 2003 14:07:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:31 GMT