i have a tiny little problem with xslt, js and html entities, eg. within a template:
<script type="text/javascript">
<xsl:value-of select="/some/node"/>
for (var i = 0; i < 5; i++) {
// ^^^ js error
}
</script>
<script type="text/javascript">
<xsl:value-of select="/some/node"/>
for (var i = 0; i < 5; i++) {
// ^ xslt error
}
</script>
<script type="text/javascript">
<xsl:value-of select="/some/node"/>
// <![CDATA[
for (var i = 0; i < 5; i++) {
// ^ becomes <
}
// ]]>
</script>
<script type="text/javascript">
<xsl:value-of select="/some/node"/>
for (var i = 0; i <xsl:value-of disable-output-escaping="yes" select="string('<')"/> 5; i++) {
// works of course
}
</script>
does anyone have an idea where my problem could come from? i always thought the xslt processor would leave the content of a <script/> element unescaped when using the html output method ...
i run libxslt2 version 1.1.24 on OSX which was installed using macportsports ...