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

Preventing CDATA output in XHTML

Subject: Preventing CDATA output in XHTML
From: "Brian Koontz" <briank@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 2 Jul 2007 15:52:52 -0500 (CDT)
 Preventing CDATA output in XHTML
Environment:

DOM/XML API Version 	20020815
libxml Version 	20616
libxslt Version 	1.1.11
libxslt compiled against libxml Version 	2.6.16
libexslt Version 	1.1.11
PHP 4.3.6

I'm trying to prevent CDATA tags from being generated in my XHTML output. 
Here's what's in the XSL:

    <script type="text/javascript">
      some_func("some_arg")
    </script>

Here's the output:

<script type="text/javascript">
<![CDATA[
      some_func("some_arg");
    ]]>
</script>

which FF refuses to parse without errors.

I've poured through the FAQs and have tried everything suggested: 
Wrapping in <xsl:text>, wrapping in an HTML comment, using the
disable-output-escaping=yes attribute on <xsl:text>, etc.

XSL such as this:

    <script type="text/javascript" src="js/somefile.js"></script>

is rendered without CDATA tags.

I've run out of ideas...about the only idea remaining is to switch XSLT
libs to see if that resolves the problem. Suggestions?

  --Brian

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.