Re: CSS parser recovery

Ian Hickson wrote to <> on 13 December 2002 in
"Re: CSS parser recovery"

> [Any] stream of characters should [...] be parseable.

Why do you so advocate?  David Baron has advocated for something
similar (read "Re: Quote marks allowed unmatched in core grammar
(CSS2)", <> /
but I fail to understand the motivation.  How many computer languages
allow any sequence of characters?      

Let us examine Extensible Markup Language as a reference point.  XML
has been, is now, and will continue to be a tremendous success.  Its
acceptance and implementation in various industries has been rapid and
widespread.  The number of implementations that conform to finalized
Recommendations is large and growing, and other implementations come
close to conformance.

Yet XML has strict syntactical requirements.  How can this be?  In
fact, this is far from contradictory.  The syntactical restrictions
are a direct contributor to the success of XML.  People and software
do not pass junk as XML because the acceptance of junk is minimal
among XML tools.  The retention of restrictions on data is what
encourages implementors to create and maintain XML software, knowing
that lengthy error testing and recovery are not necessary.       

XML should, in its strictness, serve as a model for CSS.  Allowing all
sorts of junk in the core CSS grammar benefits only the authors of
junk, who will be able to claim conformance.  Is this our goal?

Etan Wexler <>
My stepfather looks
just like David Bowie
but he hates David Bowie.

Received on Wednesday, 25 December 2002 05:35:08 UTC