W3C home > Mailing lists > Public > www-html@w3.org > April 2002

Re: Double hyphens ('--') in comments invalid

From: <news-misc@ada.dhs.org>
Date: Mon, 29 Apr 2002 02:53:05 GMT
Message-ID: <GvB6oI.7zE@ada.dhs.org>
To: www-html@w3.org
In article <5.1.0.14.0.20020423143517.00a8f0b8@parzival.integretechpub.com>,
Greg Faron <gfaron@integretechpub.com> wrote:

>   I've been directed to the XML spec in which it states
>that "for compatibility, the string '--' (double-hyphen)
>must not occur within comments."  I assume it refers to the
>compatibility with SGML (of which I know very little).

No, it refers to compatibility with HTML, which, because web
browsers have been buggy w.r.t. comments since the beginning,
artificially limits the number of SGML comments that can be
placed inside any element to 1 comment, and which artificially
forbids comments to be placed in elements other than <!>.

In SGML, pairs of -- delimit a comment (i.e., --foo-- is a
comment for any foo that does not contain -- itself).


-- 
Ambrose Li  <acli@ada.dhs.org>   http://trends.ca/~acli/
                                              http://www.cccgt.org/
A good style should show no sign of effort;
  what is written should seem a happy accident. - Somerset Maugham
Received on Tuesday, 30 April 2002 02:26:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:51 GMT