Re: XHTML1.1 DTD errata or Validator bug?

> > 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 and, can have <html
id="w3dotorg"> and 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 only */
html#w3dotorg elem.class {
foo: bar;
... et cetera

Then in the same user CSS

/* CSS for 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