cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ellis Pritchard <el...@nukinetics.com>
Subject Re: JXTemplate and characters escaping
Date Thu, 10 Mar 2005 22:26:18 GMT
You could try wrapping the expression in a CDATA section; JXTemplate 
interprets expressions inside the CDATA, but then passes the CDATA 
itself through.

e.g.

<foo><![CDATA[#{bean.bar}]]></foo>

Should output as:

<foo><![CDATA[&#233;]]></foo>

The XSL can then select this out with <xsl:value-of select="foo" 
disable-output-escaping="yes"/>, or you may not have to worry about 
that... have an experiment!

Ellis.


On 10 Mar 2005, at 15:42, Laurent Perez wrote:

> Hello
>
> Is the JXTemplateGenerator auto-escaping required HTML chars when they
> are extracted as bean properties ? I have a weird problem with the
> following piece of jx code + xsl transformation (<xsl:value-of
> select="/foo">) :
>
> <foo>&#233;</foo> renders &#233;.
> however,
> <foo>#{bean.bar}</foo> renders &amp;#233; (bar being "&#233;" in
my 
> database)
>
> The following being observed with a <map:serialize type="xml"/> right
> after the jxtemplate generation, before the xslt transformation.
>
> Is it possible to tell the jxtemplate not to escape these chars ?
>
> Thanks
>
> Laurent
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message