Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Preventing CDATA output in XHTML

From: "Brian Koontz" <briank@------------------->
To:
Date: 7/2/2007 9:41:00 PM
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent