Tempore 11:05:57, die Saturday 08 January 2005 AD, hinc in foro {comp.text.xml} scripsit Tjerk Wolterink <>:
> <script type="text/javascript">
> //<![CDATA[
> a long javascript with < > characters, like:
> for(var i=0;i<xmlDataFunctions.length;i++) {
> }
> //]]>
> </script>
>
> Those // are javascript comments, these are neccesary because some old browsers
> do support javascript but do not support xml, so i have to comment them out with //
>
> How would you do that?
To the best of my knowledge, XSLT1.0 does not provide a way to create a CDATA section from only a part of a text node.
I'm not really convinced that there would ever be need of such output, but if you really need it and don't mind dirty hacks, you could use something like this:
<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns

sl="http://www.w3.org/1999/XSL/Transform">
<xsl

utput method="html"/>
<xsl:template match="script">
<script type="text/javascript">
<![CDATA[
//<![CDATA[
a long javascript with < > characters, like:
for(var i=0;i<xmlDataFunctions.length;i++) {
}
//]]>
]]>
</script>
</xsl:template>
</xsl:stylesheet>
regards,
--
Joris Gillis (
http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Vincit omnia simplicitas
Keep it simple