On Wed, Feb 9, 2011 at 00:13, stuart yeates <stuart.yea...@vuw.ac.nz> wrote:
> On 09/02/11 08:36, helix84 wrote:
>> On Tue, Feb 8, 2011 at 16:43, Wendy J Bossons<wboss...@mit.edu>  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;

I tried several variations of that but it never worked. E.g. this one:
<script type="text/javascript>
&lt;![CDATA[
....
]]&gt;

will just output the entities literally to HTML.

Can you provide a working snippet?

Regards,
~~helix84

------------------------------------------------------------------------------
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
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to