cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Muc <alex....@utoronto.ca>
Subject Re: <![CDATA[]]>
Date Thu, 23 Mar 2000 17:12:56 GMT
On the cocoon-users list there is another message for this thread which indicates
that the output escaping isn't operating correctly and that it is supposed to be
fixed in the next release for cocoon (1.7.1).  Has this bug been fixed in
1.7.1dev?  Is it accessible from the CVS?  If not, if someone can give me a
little background info I'll take a look at trying to fix it.  In particular, is
this a cocoon, xerces or xalan problem?

Thanks
Alex

Jonathan Stimmel wrote:

> On Mon, Mar 20, 2000 at 05:04:22PM +0100, Jan Sundin wrote:
>
> > I'm using a <![CDATA[]]> element that holds HTLM-tags, i do not want the
> > content of the element to be escaped or modified in any way.
> > But when using Cocoon 1.7.1-dev, xalan_0_20_0, xerces_1_0_3. A
> > <![CDATA[<DIV>]]> gets output as "&lt;DIV&gt;". I had expected
to get <DIV>.
> >
> > Have i missunderstood something?
>
> Yes, I believe you have. CDATA is needed if you need characters such
> as "<", ">", and "&" preserved. I find it most useful in xsp pages (as
> described in the xsp intro documentation):
>
>   <xsp:logic><![CDATA[
>     int i;
>     for (i=0; i < 10; i++) { } // the "<" would generate an error w/o CDATA
>   ]]></xsp:logic>
>
> rather than:
>
>   <xsp:logic>
>     int i;
>     for (i=0; i &lt; 10; i++) { }  // Note the use of "&lt;"
>   </xsp:logic>
>
> I don't know what you're trying to accomplish, but I suspect that
> what you really need to do is use "<DIV/>" (to turn it into a
> valid, empty xml tag). You'll likely find that cocoon strips
> out the extra "/" before it reaches the browser.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message