[Petal] <![CDATA[ ... ]]> and HTML Elements

Chris Croome chris at webarchitects.co.uk
Tue Nov 9 10:20:09 GMT 2004


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 at webarchitects.co.uk>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/   


More information about the Petal mailing list