Re: comment nodes

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

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 UTC