[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: Un-cdata-section-elements

Subject: Re: Re: Un-cdata-section-elements
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 22 Mar 2006 10:05:27 GMT
Re:  Re: Un-cdata-section-elements
> Again, the problem isn't the validity of the markup, but the
> JavaScript as interpreted by various browsers; some processors
> (possibly all?) will throw a CDATA around anything in the <script>
> element by default, mostly because the chance of bumping into
> non-valid stuff is high.

No. HTML processors interpret the content of a script as CDATA as HTML's
script element is defined to be of type CDATA. CDTATA elements do not
exist in XML so in XHTML script is a normal element (with PCDATA
content). Your problem is just caused by sending a page marked up in one
language (XHTML) to a browser written to interpret another (HTML).
It's like sending Java to a C compiler: you get syntax errors.

> The '// CDATA' best-practice rule is of course inclusive of all
> browsers, new and old, and I would have liked to play it that way. Oh
> well.

You can use disable-output-escaping to get that from XSLT, if you must.

<xsl:text disable-output-escaping="yes"><![CDATA[
  ..... stuff here ...


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.