[topicmapmail] xml:base and #foo URIs

Lars Marius Garshol larsga@garshol.priv.no
23 Apr 2003 14:23:40 +0200


* Thomas B. Passin
|
| To sum up, between the RFC and XML Base, I see it as very clear that
| a bare fragment identifier refers to a location in the base uri of
| the context element, and that would be an in-document reference if
| there is no other base uri established.

I've seen the sections you referenced, but the trouble is that there
is one part of RFC 2396 that seems to contradict all of this, and that
is section 4.2:

   A URI reference that does not contain a URI is a reference to the
   current document.  In other words, an empty URI reference within a
   document is interpreted as a reference to the start of that
   document, and a reference containing only a fragment identifier is
   a reference to the identified fragment of that document.  Traversal
                                          ^^^^^^^^^^^^^^^^
   of such a reference should not result in an additional retrieval
                              ^^^
   action.  However, if the URI reference occurs in a context that is
   always intended to result in a new request, as in the case of
   HTML's FORM element, then an empty URI reference represents the
   base URI of the current document and should be replaced by that URI
   ^^^^^^^^
   when transformed into a request.

Note how, in this section that is speaking *only* of how to resolve
fragment references and "" references it carefully distinguishes
between "the current document" and "the base URI". It seems clear that
when it says "of that document" it means the URI of that document, and
not the "base URI", since they would have written that if they meant
it.

As far as I can tell, this section is saying that URI references that
only consist of a fragment identifier are resolved relative to the URI
of the current document and that the base URI does not come into play
*at*all*. This means that XML Base, as far as I can see, does not
affect these URI at all.

In addition comes this reply from Paul Grosso that is rather clearer
than his reply to me:

  "It is important that RDF and everyone else realize that use of XML
  Base requires compliance with RFC 2396 which requires that relative
  URI references consisting of just the fragment id ignore any base
                                                    ^^^^^^^^^^^^^^^
  URI and instead always refer to a fragment id within the current
  ^^^
  document."
    <URL: http://lists.w3.org/Archives/Public/uri/2002Apr/0035.html >

Given all this it seemed, and still seems, pretty clear to me that XML
Base does not affect the resolution of "#foo" URIs, and that therefore
the URI assigned to say <topic id="foo"/> should do the same.

If anyone wants to argue that reading this out of the XML Base
specification alone is impossible I'd have to agree with them.

-- 
Lars Marius Garshol, Ontopian         <URL: http://www.ontopia.net >
GSM: +47 98 21 55 50                  <URL: http://www.garshol.priv.no >