W3C home > Mailing lists > Public > public-grddl-wg@w3.org > June 2007

RE: Use of xml:base of in XHTML family documents

From: Clark, John <CLARKJ2@ccf.org>
Date: Tue, 26 Jun 2007 09:47:13 -0400
Message-ID: <F122C25B4CD6F34BB119A97593679601027CA8C1@CCHSCLEXMB59.cc.ad.cchs.net>
To: "Ogbuji, Chimezie" <OGBUJIC@ccf.org>, "GRDDL Working Group" <public-grddl-wg@w3.org>

Chime wrote:
> I don't follow the rational for the language in the new Base 
> URI appendix that says:
> "Other XML documents may use XML Base. This is only 
> recommended when the specific document format permits the use 
> of XML Base. Specifically, xml:base should not be used with 
> XHTML family documents."

> This is WRT to the thread [1] on xml:base in XHTML.  I have a 
> problem with this.  In particular the last sentence can't be 
> enforced by any specification I know of.  The use of xml:base 
> in an XHTML document may result in an invalid XML document 
> (WRT XHTML DTD's) but that is quite different from 
> discouraging this explicitly (I don't think GRDDL should be 
> doing this).  AFAIC, the following document is not valid but 
> nothing else is wrong with it:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" 
> xml:base="http://example.com/foo">
> <body/>
> </html>

There is certainly nothing wrong with it; I would argue that it would
simply be treated as a regular XHTML document and the `xml:base`
attribute might be ignored.  To start with an experiment, I made a quick
change to your document above, giving the following document:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" 
  <a href="bar">Link to bar!</a>

I then loaded this document in both Internet Explorer and Firefox.  When
treated as an HTML document, both IE and Firefox resolved the relative
reference "bar" using the retrieval IRI of the document.  When treated
as an XHTML document, IE of course fails to render the document but
Firefox ( resolves the relative reference using the `xml:base`
value.  I find this very interesting.

> XML Base language is crystal clear about its use going 
> 'forward' for XML documents in general (which the above most 
> certainly is - even though it is not an XHTML document).  
> None of Jeremy's spelunking [2] found anything to suggest otherwise.
> [1]http://lists.w3.org/Archives/Public/public-grddl-wg/2007Jun
> [2]http://lists.w3.org/Archives/Public/public-grddl-wg/2007Jun

I didn't think it was as clear as you indicate, because of the following
wording in the XML Base recommendation:

<quote resource="http://www.w3.org/TR/xmlbase/#introduction">
The deployment of XML Base is through normative reference by new
specifications, for example XLink and the XML Infoset. Applications and
specifications built upon these new technologies will natively support
XML Base. The behavior of xml:base attributes in applications based on
specifications that do not have direct or indirect normative reference
to XML Base is undefined.

Based on that, I had thought that since none of the core XHTML (1.x)
specifications allowed `xml:base` attributes (and thus did not
normatively reference XML Base), that `xml:base` would simply be ignored
in XHTML documents.  Perhaps, however, there is another way to think
about XHTML documents that use `xml:base` attributes.  Just as MathML
2.0 defines the compound language "XHTML 1.1 plus MathML 2.0", one might
easily define the compound language "XHTML 1.1 plus XML Base"; it
certainly seems that an author using `xml:base` attributes in XHTML
documents has just this sort of compound dialect in mind.

If it is indeed the case that `xml:base` attributes extend the
underlying XHTML semantics, then we've come full circle and my earlier
reasoning on resolution[0] may be correct.  It also means that we'd need
to edit the base URI appendix and that test case #svg-in-html-5
(currently listed in the Pending GRDDL Tests document[1]) is incorrect
about its output.

We get interesting results if I change the above "XHTML 1.0 plus XML
Base" document again to use both XML Base and XHTML base:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" 
<head><base href="http://example.org/foo/baz"/></head>
  <a href="bar">Link to bar!</a>

In Firefox, the relative reference "bar" is resolved to


[1] http://www.w3.org/2001/sw/grddl-wg/td/pendinglist#svg-in-html-5

Take care,

    John L. Clark


Cleveland Clinic is ranked one of the top 3 hospitals in
America by U.S.News & World Report. Visit us online at
http://www.clevelandclinic.org for a complete listing of
our services, staff and locations.

Confidentiality Note:  This message is intended for use
only by the individual or entity to which it is addressed
and may contain information that is privileged,
confidential, and exempt from disclosure under applicable
law.  If the reader of this message is not the intended
recipient or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If
you have received this communication in error,  please
contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy.  Thank you.
Received on Tuesday, 26 June 2007 13:47:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:52:39 UTC