Re: Why is CSS not an SGML app?
Jay Bazuzi writes:
> Apologies if this is a FAQ; I'm new to www-style.
I don't think it is FAQ, but it has been discussed in some detail. See
my message in the archives at:
One additional reason not mentioned there is the fact that a syntax
that doesn't look like SGML is much easier to embed in an SGML
document. That's why CSS doesn't use any `<' or `&' characters.
> I understand that CSS was originally meant as a proof-of-concept for
> style negotiation and not as someone's idea of the perfect syntax. It
> seems to me, however, that an SGML application would be much more
> appropriate. Style sheets have a very clear structure. There are
> many reasons for using SGML here, including validation, use of
> existing SGML tools, and a rigorous and clear syntax specification.
We don't claim that CSS is `the perfect syntax', but is was
consciously designed this way and it was also an early decision *not*
to use SGML syntax.
SGML tools don't help much. They might be able to check the syntax for
you, but I could give you a tiny C program that can do that
better. SGML tools won't check the semantics.
I hoped for a while that browsers would incorporate SGML parsers but
at the moment they don't and it seems unlikely that they will in the
foreseeable future. Therefore, adding a format in the time-proven way,
by defining what Brian Kernighan calls a `little language', is much
easier for users as well as implementers.
SGML may be nice for text, and it is true that it can be used for
anything you like, from databases to graphics formats, but what would
you think if your programming language looked like SGML instead of C
> I'm betting that it's way too late now -- MS, Netscape, W3C, and
> others have decided to support CSS.
Bert Bos ( W 3 C ) http://www.w3.org/
firstname.lastname@example.org 2004 Rt des Lucioles / BP 93
+33 93 65 77 71 06902 Sophia Antipolis Cedex, France