On 09/02/11 08:36, helix84 wrote:
> On Tue, Feb 8, 2011 at 16:43, Wendy J Bossons<[email protected]>  wrote:
>> The 10,000 dollar question - Is it possible to allow CDATA output in the
>> head of a DSpace document? I want to add some javascript that contains an&
>> and cannot get the source output to include CDATA tags. I am writing it in
>> the structural.xsl this way . . . Everytime I view the html source, all I
>> get are the //, no cdata tags. They have been stripped.
>> <script type="text/javascript>
>> //<![CDATA[
>> ....
>> // ]]>
>
> Well, I'm not sure that's even possible. But there's a simple
> workaround, just have your CDATA in a separate javascript file and
> include it in head.

The alternative is to XML-encode the javascript. this involves replacing:

& with &amp;
< with &lt;
 > with &gt;

cheers
stuart
-- 
Stuart Yeates
Library Technology Services http://www.victoria.ac.nz/library/

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to