Re: DIV/CLASS

Mike Meyer (mwm@contessa.phone.net)
Wed, 15 May 1996 15:51:36 PST


Subject:  Re: DIV/CLASS
In-Reply-To: <199605152121.OAA01998@web1.calweb.com>
From: mwm@contessa.phone.net (Mike Meyer)
Date: Wed, 15 May 1996 15:51:36 PST
Message-Id: <19960515.7783B40.E60F@contessa.phone.net>
To: www-html@w3.org

> While we're at it, can we solidify the hopelessly ambiguous and
> ill-specified comment syntax?  No matter what, we're going to
> break some existing browsers when that one is cleared up, so we
> might as well pick the cleanest, easiest-to-parse (and as it
> happens de facto standard) syntax.  I.e., begin with <!-- and
> end with -->, no exceptions, no weird stuff like "<! -- first
> comment -- bet I can break your parser! -- second comment -- >".

Basically no, not without giving up on being an SGML application.
People not using SGML tools may not consider that a problem, but I
personally would hate to give them up (or can you show me an HTML
editor that doesn't have SGML roots that has a "close current element"
command?), and expect that others who are taking advantage of the
existing tool base would as well.

Further, the the comment syntax is only hopelessly ambiguous and
ill-specified when you try and describe current practice. It has a
very solid and reliable specification otherwise, and you really don't
want to lose some of the things that it lets you do even though they
aren't usefull to you now.

The syntax is:

Comments begin with "--" in markup declaration, or (special case) as
"<!--" which starts a comment declaration. Comments end with "--".
Markup ends with ">". Only whitespace characters are legal outside of
the comments in a comment declaration.

Your example is illegal for two reasons: 1) The opening string has to
be "<!--", no whitespace etc., and 2) you have text outside the
comments.

In practice, keeping the spec the way it is lets people who like
borders on comments keep writing:

	<!-- This is a lot of comment text --
	  -- and this is more comment text --
	  -- and here is the last bit.     --
	>

and have it work.

People who are using SGML tools probably want to keep comments in MD
as well; hopefully applications will eventually grow to recognize
those so we can use them for author-defined macros and similar things.
You'll want the "-- ... --" comments in general MD then.

	<mike