Re: Bugreport on comments
Robin Houston (robin@oneworld.org)
Fri, 05 Dec 1997 14:42:47 +0000
I would agree with the suggestion that netscape_buggy_comment() be turned
on by default.
A pedant by nature, I turn away in disgust when I see <!-- -- --> used
incorrectly. I write long comments
<!--------------------------------------------------
like this
--------------------------------------------------->
and I make sure that the number of hyphens is congruent to 2 (modulo 4).
I suspect that we pedants are a minority. Most HTML authors (hence most
pages on the web) are written by those with no such scruples. Netscape's
parsing of comments is *NOT*, despite what many are saying, incorrect. Any
implementation of a public protocol ought, in order to be most useful, to
be conservative in what it produces and liberal in what it accepts.
An HTML parser such as that of Netscape need only interpret syntactically
correct input. The interpretation of syntactically *in*correct input is
formally undefined.
It is therefore reasonable for an HTML parser to behave as Netscape does.
.robin.
PS: Perhaps it would be helpful to distinguish between two different kinds
of parsing: (1) "practical" parsing, in which it would be most useful for
syntactically incorrect pages to yield *some* kind of parse tree and (2)
error checking, for which syntax errors should be flagged.