[topicmapmail] xml:base and #foo URIs

Thomas B. Passin tpassin@comcast.net
Wed, 23 Apr 2003 19:27:33 -0400


[Lars Marius Garshol

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

I noticed that part too, but I though that all the other parts of the RFC
and XML Base superceded that - too bad they did not say "notwithstanding the
forgoing, a fragment identifer with no URI MUST be treated as follows..."

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

Maybe so - I presume that Paul knows something worth hearing here.

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

Murray says

"You might note that RFC 2396 was written in 1998 and was not
designed for XML documents in particular, whereas XML Base was,
hence we should put priority on the later and more pertinent
document. XML Base does not supercede the RFC but modifies it
for use within XML environments."

I did not think that XML Base modified the RFC at all, just spelled out the
resolution of relative URIs in xml elements and context.  Of course, it says

" The base URI for a URI reference appearing in any other attribute value,
including default attribute values, is the base URI of the element bearing
the attribute. "

and I thought that a bare frag ID would be covered by this too, but
apparently not, if we put more credance in RFC Section 4.2.  Personally, I
would be happy to get rid of the possibility of using xml:base to affect
bare frag IDs. Is anyone actually using xml:base in an xtm file to modify
the URI of a bare frag ID?  If not, what other uses in xtm have people found
for xml:base?  Just to shorten URIs in resourceRefs and
subjectIndicatorRefs?

Cheers,

Tom P