W3C home > Mailing lists > Public > www-validator@w3.org > May 2003

Re: XHTML1.1 DTD errata or Validator bug?

From: Jonathan Stanley <jon@lambcutlet.org>
Date: Sat, 3 May 2003 19:45:45 +0100
Message-ID: <046d01c311a4$353faca0$702698d5@meugh>
To: "Gannon J. Dick" <gdick@verizon.net>, <www-validator@w3.org>

> > I used a unique id is used to give it a "hook" for user specified CSS,
> > that they can specify CSS rules by:
> >
> > html#mydomain elem.class {
> > foo: bar;
> > }
> Wouldn't that interrupt,  the "Cascade", import order, whatever?

Nope, it's just a descendant selector as defined in CSS2. Why would one want
to give html an id? Consider w3.org and ietf.org, w3.org can have <html
id="w3dotorg"> and ietf.org have <html id="ieftdotorg">

Now, when a user specifies a user stylesheet, along side global rules they
might have for CSS styling, they could have id specific ones, and do:

/* CSS for w3.org only */
html#w3dotorg elem.class {
foo: bar;
... et cetera

Then in the same user CSS

/* CSS for ietf.org only */
html#ieftdotorg elem.class {
foo: bar;

Since the id should be unique, said bits of CSS are contained.

> >
> > Giving body a unique id would suffce in HTML4, but it seems in XHTML,
> > sending as application/xhtml+xml to compliant agents (Gecko and Amaya),
> for
> > Gecko at least, <html> is a better place to give the unique id than usng
> > <body>, since <body> looses it's "magicness", and <html> behaves more
> > the canvas.
> >
> So, if you want to treat the <html> root node of an XML file the thing to
> would be to insert an xml-stylesheet
> processing instruction  <?xml-stylesheet type="text/css"
> href="mydomain.css"?>
> ...  I'm not sure about Gecko but Modzilla, Opera, Amaya or even IE have
> problem with that.

Mozilla is based on Gecko, but that isn't the issue at hand. The "issue" is
has XHTML1.1 changed from XHTML1.0, and doesn't allow the "id" attribute in
<html> anymore, or whether it's a DTD error, or validator error.

> > I can do this in XHTML1.0 (Strict or Transitional) but I _cannot_ do so
> > XHTML1.1, which should just be XHTML1.0 Strict modularized.
> I thought so too.

If it's just been modularized (as I thought too), then by virtue it should
be allowed. "id" is meant to be universal...
Received on Saturday, 3 May 2003 14:45:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:58:34 UTC