Hi, I'm using Oracle's XMLTYPE to retrieve an XML doc, an XSL doc, and then transform the XML using the XSL.
Here's a snippet from my xsl:
The tranformation seems to completely ignore the CDATA section, and it escapes it anyway. Here's the output:
Is this a bug with Oracle, or is there something I can do to preserve the javascript?
Thanks for the help!
Code:
v_web_xml := get_web_xml('en-US', TRUE);
v_web_xsl := get_web_xsl('MODELPAGE');
v_html := v_web_xml.transform(v_web_xsl);
Here's a snippet from my xsl:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version = "1.0"
xmlns:xsl = "[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL]
xmlns:math="[URL unfurl="true"]http://www.exslt.org/math"[/URL]
exclude-result-prefixes="math"
disable-output-escaping="yes">
<xsl:output method = "html" indent = "no"/>
<xsl:strip-space elements = "*"/>
<xsl:preserve-space elements = "sp"/>
<xsl:template match = "/*">
<script type="text/javascript"><![CDATA[
function getOLs() {
if(typeof window.onload=='function'){
if(typeof ol_ol=='undefined')ol_ol=new Array();
ol_ol.push(window.onload);
}
}
getOLs();
...
]]></script>
The tranformation seems to completely ignore the CDATA section, and it escapes it anyway. Here's the output:
Code:
<script type="text/javascript">
function getOLs() {
if(typeof window.onload=='function'){ // test to see if onload has been set
if(typeof ol_ol=='undefined')ol_ol=new Array(); // test if array variable already exists
ol_ol.push(window.onload); // this captures any previous onload function
}
}
getOLs();
Is this a bug with Oracle, or is there something I can do to preserve the javascript?
Thanks for the help!