xsl-list
[Top] [All Lists]

[xsl] Preventing CDATA output in XHTML

2007-07-02 14:41:26
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




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--