Re: Is this use of BASE kosher?

Owen Rees (
Fri, 4 Aug 95 07:47:42 EDT

"Daniel W. Connolly" <> writes:
> >We need to address this because the two biggest browser vendors have
> >interpreted this 180 degrees out of synch, and because it affects how all
> >of us write HTML documents, period.
> I believe that those implementations are not in conflict with the
> current HTML 2.0 draft, but that they are stupid and brain-dead
> nonetheless.
> I can't think of anything to put in the spec that will make that
> behaviour illegal that won't sound stupid like "don't do what
> Netscape does in this case."

Problems arise only when the BASE is not a valid URI for the document
that contains it. In the evolution of the HTML 2.0 spec somewhere
between -01 and -04, the words

The Base element allows the URL of the document itself
to be recorded in situations in which the document may
be read out of context.

have been removed, and there is no longer any clear statement that the
URI in BASE should be treated as a URI for this document. I have
already pointed out that by working back from the statement in 7.4
about the '#fragment' degenerate case and the rule in 7.1, it can be
deduced that the base URI must refer to "the same document".

The options seem to be:
1) BASE is only for resolving relative URLs, it may be a URI for a
different resource.
2) BASE must be a URI for this document

If case 1 is preferred, then '#fragment' is no longer a degenerate case
of the access rule and the wording in 7.4 must be changed - this
requires a decision on whether it should mean "this#fragment" or
"base#fragment". The former seems more popular so the wording would
need to change to something like:

Any characters following a `#' character in a URI constitute a
fragment identifier. A URI of the form `#fragment' is an exception
to the general rule and refers to an anchor in the same document,
even when the base URI refers to some other resource.

In case 1, the comment in the DTD would also need to be changed to
something like:

<!-- <BASE HREF="..."> Address for resolving relative URIs -->

If case 2 is preferred, then some change such as the wording I
suggested in a previous note is needed so as to clarify the meaning.

My observations suggest that browser authors are assuming case 2, with
differing policies on when to reload resources, and which URI to use as
the name of the resource in various places. These differences lead to
different behaviour when BASE gives a URI for a different resource.

It looks as if there was a move towards case 1 somewhere between drafts
-01 and -04 but it has not been completely followed through. I think
that now is the time to either go all the way (to case 1), or back out
(to case 2).

My preference is for case 2; the effect of case 1 can be achieved by
using only absolute URLs and omitting BASE.

Owen Rees
<>, <URL:>
Information about ANSA is at <URL:>.