W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2010

Re: Tidy converts "--" in comments...

From: Richard O'Keefe <ok@cs.otago.ac.nz>
Date: Tue, 2 Mar 2010 09:08:58 +1300
Cc: html-tidy@w3.org
Message-Id: <37694993-41A6-4713-8B13-AFDD408804E4@cs.otago.ac.nz>
To: Dennis Kowallek <kowallek@iglou.com>
>
> The reason I asked is that these comments actually contain valid HTML
> that I may wish to uncomment in the future. I would prefer that tidy  
> did
> not muck with this.

Don't do it that way.
I really really mean this: DON'T DO IT THAT WAY.

Many people are very fond of nested comments.
I think out of the 400 or so programming languages I studied
over the years I once found *one* where nested comments
actually worked.

XML comments were never ever meant to include XML.
SGML *does* have a mechanism for conditional inclusion of
SGML, but XML restricts it to the DTD.

For conditional inclusion of XML, use XInclude, and
(de)activate it in the DTD.  Or use XSLT or something of
the sort.  Anything where you don't have to rely on breaking
the syntax.
Received on Monday, 1 March 2010 20:09:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:14:00 GMT