You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Chris John <ch...@london.virgin.net> on 2001/02/05 18:34:12 UTC

CDATA

Hi, am experiencing difficulties using the CDATA tag. Basically the
following code in the xsl document:

<title><![CDATA[ <%=screen.getPageTitle()%> ]]></title>

Returns the following code in the HTML document:

<title> &lt;%=screen.getPageTitle()%&gt; </title>

It is converting the greater than and less than signs into the special
character codes for html, I need them to appear as is. The odd thing is that
when the same code is put inside a comment, script or style tag it behaves
as would be expected and results in the < or > appearing in the HTML. I have
tried this both in Xalan 1 and Xalan 2 with the same result.

The following is the code I use at the start of the XSL document:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" indent="no"/>

Could you please advise on how get
title><![CDATA[ <%=screen.getPageTitle()%> ]]></title> code in the html
document.

Thanks
Chris

Chris John
Web Designer
Virgin Net
020 7664 6042
chrisj@london.virgin.net
http://www.virgin.net