Re: <![CDATA[ ... ]]> and HTML Elements

Chris Croome <chris-u/[email protected]>
Newsgroups gmane.comp.lang.perl.modules.petal
Message-ID <[email protected]>
Hi

On Mon 08-Nov-2004 at 04:13:08PM -0500, William McKee wrote:
>
> I'd since stopped using the // <!-- // --> comments since they are
> mostly unnecessary.

They are potentially worse than unnecessary if you are producing
XHTML:

  C.4. Embedded Style Sheets and Scripts

  Use external scripts if your script uses < or & or ]]> or --.
  Note that XML parsers are permitted to silently remove the contents
  of comments. Therefore, the historical practice of "hiding" scripts
  and style sheets within "comments" to make the documents backward
  compatible is likely to not work as expected in XML-based user
  agents.

  http://www.w3.org/TR/xhtml1/#C_4

Chris

-- 
Chris Croome                               <chris-u/[email protected]>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.