W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2000

Re: comment nodes

From: K. Ari Krupnikov <ari@iln.net>
Date: Fri, 22 Sep 2000 12:25:33 -0700
Message-ID: <39CBB22D.E4647C31@iln.net>
To: www-dom@w3.org
Joseph Kesselman/Watson/IBM wrote:
> 
> >Is it legal for a comment node to be created or modified to contain the
> >string '-->' in it?
> 
> As far as the DOM is concerned, yes. It's the serializer's responsibility
> to do something appropriate with it -- complain, or change the > into &gt;,

It's not the '>' that is the problem - it's the '--':

XML rec, 2.5 Comments
(http://www.w3.org/TR/1998/REC-xml-19980210#sec-comments) says 'For
compatibility, the string "--" (double-hyphen) must not occur within
comments.'

BTW, are entity references resolved in comments?

Ari Krupnikov
Received on Friday, 22 September 2000 15:25:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT