A. Pagaltzis wrote:
It makes me wonder whether the person who wrote the example was
unaware of the consequences of the same-document reference
specifications in the URI RFC. Surely, the xml:base WG must have
noticed this issue and discussed it?
I wonder how many people are aware of it. I wonder if we managed to
convince any readers on the atom list at all. Tim Bray hasn't responded
yet, so I guess he is still in doubt.
I found out about it through Mozilla Bug 241981.
https://bugzilla.mozilla.org/show_bug.cgi?id=241981
Mozilla had implemented that the http content-location header sets the
base href. But as Mozilla has no same-document reference support, it
would navigate to the content-location document when you clicked on an
internal link. The solution was to revert content-location support, and
noting that it was broken-by-design. I found this hard to believe, and
tried figuring out what was really supposed to happen.
Notice that xml:base describes **a base URI**. The xml:base TR does
not define what a base URI is. It’s RFC3986 (and originally, RFC2396)
which does, while describing just what an URI is, to begin with. The
same-document reference stanza in the URI RFCs is clear evidence that
in the spirit of the spec, “base URI” means “the source URI of the
content,” not “the prefix I wish to apply to relative references.”
RFC2396 is not the original spec, HTML 2 is. Later versions of HTML
screwed up. I wrote up the history of fragment identifiers here:
http://w3future.com/weblog/2005/01/
At first, I thought the RFC-specified same-document reference stanza
made no sense. But then I realized it is perfectly fine and
absolutely desirable for the case where the “base URI embedded in
content” applies to the entire document.
It is the xml:base TR which is at odds with this; applying
same-document reference behaviour to fragments of an aggregate
document is non-sensical. The more I think about it, the more it
seems like this interaction is Broken As Designed. xml:base should
not have adopted the “base URI” term – basically, it appears that the
very attribute name itself is a misnomer.
I don't find applying same-document reference behaviour to fragments of
an aggregate document non-sensical. If I XInclude a piece of XHTML that
has same-document references in it, I still want them to be
same-document references, and they should not link back to the original
file.
--
Sjoerd Visscher
http://w3future.com/weblog/