[topicmapmail] xml:base and #foo URIs

Lars Marius Garshol larsga@garshol.priv.no
24 Apr 2003 10:42:43 +0200


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

* Thomas B. Passin
| 
| 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..."

It's not as clear as it ought to be, I agree.
 
| Maybe so - I presume that Paul knows something worth hearing here.

Well, he's official spokesman within the W3C for the group now
responsible for XML Base.
 
| "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.

It doesn't. RFC 2396 has a clear concept of a base URI within a
document as different from the URI of the document itself (this is
discussed in many places throughout the RFC), and XML Base ties into
that nicely by modifying the base URI in a part of the document.

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

This is pretty much where we stand. RFC 2396 *appears* to say this,
but it's hard to say that it's 100% conclusive. I think both
approaches work, though there are issues with both of them. (See the
XTM 1.1 issue slides I posted to the sc34wg3 list.)

| [...] what other uses in xtm have people found for xml:base?  Just
| to shorten URIs in resourceRefs and subjectIndicatorRefs?

Yes. That's pretty much the only thing it can do.

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