Before I explain the problem I am facing, I probably need to explain the problem that I wanted to solve first. :)
I have XML to be formatted using XSL. This XML contains HTML tags in CDATA, for example: -
<doc>
<![CDATA[
<b>Hello!</b>
]]>
</doc>
When XSL performs the conversion, the browser displays <b>Hello!</b>, rather than highlights, the Hello! . I checked the source code and it looks like this: -
<doc>
<b>Hello!</b>
</doc>
To solve this problem, I am thinking of using jQuery to render text as HTML, for example:
$(document).ready(function(){
var obj = $(".content");
alert("text: " + obj.text());
obj.html(obj.text());
});
So, I tried adding the JQuery library to XSL, and after several attempts and reading about the problem with the tag, <script>it seems that I need to add a fiction between the open and close tags <script>, for example this: -
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js">
<xsl:comment/>
</script>
2 Firebug: -
b.style is undefined
(function(a,b){function ci(a){return d...a:a+"px")}}),a.jQuery=a.$=d})(window);
$ is not defined
... javascript , .
JQuery 1.5.2 1.3.2, , - . Firebug: -
K.style is undefined
(function(){var R=/((?:\((?:\([^()]+\)...,typeof K==="string"?K:K+"px")}})})();
JQuery 1.3.2. : obj.html(obj.text()); .
obj.html(obj.text()); obj.text("Just Testing: " + obj.text());, , ... , Just Testing: .
obj.html(obj.text()); ? : HTML- CData HTML, ?
.
UPDATE
... obj.html("aaa"); . , - XSL, JQuery . 1.3.2.