CSS grammar/syntax

I've been doing some work recently using CSS to format XML.  I used a
variety of tools including the CSS valuators, multiple browsers, and
specialized CSS editing tools.  Some tools act quite different than others
so I often check back with the spec to see which is correct.  Recently,
while examining some XML that contained underscores within element names, I
noticed an oddity between CSS and XML.  In reading the CSS grammars (1, 2, &
3), I've noticed that underscores are not valid within element names.
However, the XML spec allows elements to contain underscores.

With a search of the archive of this mailing list, the only reason I could
find is that underscores where not allowed in CSS1 because no HTML elements
contained underscores and that subsequent versions of the CSS spec must
maintain compatibility with CSS1.

I am wondering if there are any other reasons underscores are not allowed
within element names?



Jonathan

Received on Monday, 10 July 2000 14:09:02 UTC