Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Xsl transform of javascript in xml

user573698Feb 2 2011 — edited Feb 4 2011
I have generated xml such as this:
<JAVASCRIPT>
<![CDATA[
function abc(n,s) {
if( n < 10)
return true;
if( s == "xxx")
return false;
and so on
}
]]>
</JAVASCRIPT>

What xsl i have to use to get correct javasript in html page?

I tried this:
<xsl:for-each select="/JAVASCRIPT">
<script type="text/javascript">
<xsl:value-of select="." disable-output-escaping="yes"/>
</script>
</xsl:for-each>
but it does not produce correct html javascript because of < and " on Oracle 11.2.
Any help is welcome.

Edited by: user573698 on 2.2.2011 0:43
This post has been answered by odie_63 on Feb 3 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 4 2011
Added on Feb 2 2011
4 comments
264 views