|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: using xsl:output-character to render characters in
>> One of the reasons I am using a character map in this example is to
>> create a CDATA section in the output:
>>
>> <script type="text/javascript">//<![CDATA[
>> some.onload(function(){
>> });
>> //]]></script>
>>
>> As I need '//' to appear before the CDATA section I cannot use the
>> cdata-section-elements <xsl:output/> attribute.
>>
>> (Here's an example of why I need the '//':
>> http://javascript.about.com/library/blxhtml.htm )
>>
>> Is there a way I can produce this kind of CDATA section in the output
>> without resorting to character maps?
>
> Though I loath to recommend it, you could use disable-output-escaping= as
> follows:
>
> <script type="text/javascript">//<xsl:text
> disable-output-escaping="yes"><</xsl:text>![CDATA[
> some.onload(function(){
> }};
> //<xsl:text disable-output-escaping="yes">]]></xsl:text></script>
Or if you use the "html" output method, then
<script type="text/javascript">//<![CDATA[
some.onload(function(){
});
//]]></script>
should serialise as
<script type="text/javascript">//<![CDATA[
some.onload(function(){
});
//]]>
</script>
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








