I have a little problem with xslt, js and html objects, for example. in the template:
<script type="text/javascript">
<xsl:value-of select="/some/node"/>
for (var i = 0; i < 5; i++) {
}
</script>
<script type="text/javascript">
<xsl:value-of select="/some/node"/>
for (var i = 0; i < 5; i++) {
}
</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++) {
}
</script>
Does anyone have an idea where my problem might come from? I always thought that the xslt processor would leave the contents of the <script /> unescaped element when using the html output method ...
i run libxslt2 version 1.1.24 on OSX that was installed using macportsports ...
source
share