W3C home > Mailing lists > Public > www-html-editor@w3.org > April to June 2008

Please clarify: XHTML 1.0 Strict allows relative base URIs

From: Joe Vornehm <joe.vornehm+w3c@gmail.com>
Date: Tue, 3 Jun 2008 15:07:07 -0400
Message-ID: <82f1d2580806031207l5b802b20r626301e82d1f9c4@mail.gmail.com>
To: www-html-editor@w3.org

Are relative URIs allowed for the <base href="..." /> tag in XHTML 1.0
Strict?  They appear to be, but they are explicitly disallowed in HTML
4.01.  Here is what I've found:

The HTML 4.01 specification, section 12.4, explicitly disallows
relative base URIs in HTML documents.  See
Note that the HTML 4.01 DTD simply defines the href attribute as
having type %URI, which is given in RFC 2396 as either a relative URI
or an absolute URI.  The restriction is due to the wording in the
specification, not the DTD.

The XHTML 1.0 specification does not give such a restriction
explicitly.  The only normative section that defines the base tag is
Section 3, "Normative Definition of XHTML 1.0," which states only that
the document "must conform to the constraints expressed in one of the
three DTDs" (Strict, Transitional, Frameset).  See
The XHTML-1.0-Strict DTD only defines the href attribute's type as
%URI, which is given in RFC 2396 as either a relative URI or an
absolute URI, just as with the HTML 4.01 DTD.  Since no restriction is
imposed on relative base URIs by the spec, I'm left to conclude that
they are allowed in XHTML 1.0 Strict.

Section 4 ("Differences with HTML 4") does not mention this as an
explicit difference.  It should probably be stated explicitly whether
relative base URIs are allowed or not.

Would you please clarify this issue?  Thank you.

Joe Vornehm
Received on Wednesday, 4 June 2008 07:38:52 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:08:56 UTC