xsl-list
[Top] [All Lists]

Re: [xsl] Preventing CDATA output in XHTML

2007-07-02 14:48:18
On Mon, 02 Jul 2007 14:52:52 -0600, Brian Koontz <briank(_at_)newmediagateway(_dot_)com> wrote:

<script type="text/javascript">
<![CDATA[
      some_func("some_arg");
    ]]>
</script>
which FF refuses to parse without errors.

I've noticed that both Fx and Safari have issues w/ the XHTML doctype. Try adding,

  <xsl:output doctype-system="-//W3C//DTD HTML 4.01//EN"
      doctype-public="http://www.w3.org/TR/html4/strict.dtd"; method="html"
      cdata-section-elements="script" indent="yes" />

to your transformation file and see if that fixes it.

--
/M:D

M. David Peterson
http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155

--~------------------------------------------------------------------
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>
--~--