Posts or Comments 05 July 2008

Web Architecture Matt | 28 May 2007 09:32 am

XHTML validity, enclose script and style elements with CDATA

I was reading up on the XHTML spec at w3.org and noticed something I haven’t done in years. For valid xhtml all inline script and style elements must be wrapped with CDATA. I don’t think I’ve done that since working with XML and XSLT in Cocoon v. 1. Not that this isn’t required for all XML files, it’s just been that long :-)

Also on the subject of XHTML validity, this is an interesting article about not using a text/html content type for xhtml but rather application/xhtml+xml. Of course that content type will make the markup even more strict. As the author mentions, and I’m beginning to agree with, xhtml should be avoided in pages for public consumption.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Slashdot
  • StumbleUpon
  • Technorati

Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply