Re: DIV/CLASS

Mary Holstege (holstege@kset.com)
Wed, 15 May 1996 16:39:24 -0700


Date: Wed, 15 May 1996 16:39:24 -0700
From: holstege@kset.com (Mary Holstege)
Message-Id: <199605152339.QAA26023@athena>
To: www-html@w3.org
Subject: Re: DIV/CLASS
In-Reply-To: <19960515.7783B40.E60F@contessa.phone.net>
 <19960515.7783B40.E60F@contessa.phone.net>


Mike Meyer writes about the SGML comment syntax:
> 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.

I agree with this strongly.  For my money, it is still hard to beat 
Xemacs + psgml + nsgmls for editing, validating, and debugging HTML.

>
> 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.

I mostly agree with this.  HOWEVER, the fundamental problem is that the
SGML comment syntax definition is broken.  It is "reliable" and not
"ill-specified" only inasmuch as there is a formal specification of it
that leaves no room for doubt.  But as something for real people to
use, its flaky in the extreme (which is why we have such bizarre variances
in current practice).  Any browser that only accepted the SGML comment syntax
rules would be violating the "browser tolerance" requirements.

In particular:

It is completely stupid that

<!-----------------------------------------------------
  Start of what I thought was a comment block
  ----------------------------------------------------->

will commentize vast chunks of the remaining text if I happen to have the
wrong number of dashes in there.  

It is completely stupid that

<!-- this comment -- using a double dash in the conventional way to 
     indicate a parenthetical remark -- trips up the parser -->

will generate syntax errors in an SGML validator.

There is really no decent reason why the SGML comment syntax must be so fey.
I want to see the SGML base of HTML preserved as well, but I don't think
we can be cavalier about the non-user-friendlieness here.  We could
(1) engage in a campaign to get the revision of the SGML standard to fix
this (useful, but not helpful with all the existing tools) or (2) play games
with the SGML declaration, changing COM to some other sequence that is less
likely to cause these sorts of difficulties (hits and even bigger problem with
deployed tools and data). 

My vote is for (1) and to encourage all the extant SGML tools to start at
least allowing an option of parsing comments by the rule:

<!-- starts a comment and --> ends it and it doesn't matter how many -'s
happen to fall in between.

                -- Mary
                   Holstege@kset.com


Mary Holstege, PhD  
Manager, Online Engineering
KnowledgeSet Corporation
555 Ellis Street                    Tel: (415) 254-5452
Mountain View, CA 94043             FAX: (415) 254-5451