[XML-SIG] comments and -- in SAX

Martin v. Loewis martin@v.loewis.de
23 Jul 2002 08:53:36 +0200


Mike F Miller <mikem@ichips.intel.com> writes:

> I've run into something in the SAX validation code that I'm not 
> sure is entirely correct. Basically, I've got a double dash inside
> of a comment, and SAX doesn't seem to like it at all. Is this legal
> XML and SAX is legitimately complaining or am I doing something 
> that's illegal in my XML comments?

It is ill-formed to use a -- in a comment in XML, "for compatibility"
(that is, there is no real technical reason, but it was illegal in
SGML, and to make XML a strict SGML subset, XML must carry forward
this restriction).

In any case, it is not "SAX" which reports this problem, but the
underlying XML parser.

Regards,
Martin