You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jean-Michel FRANCOIS <jm...@mururoa.com> on 2005/01/25 15:35:50 UTC

[jelly] SetTag and XML entities

Hello,

I'm using Jelly to produce some code and I'm facing problems with XML
entities.
If I try the following code:
<j:file name="myFile" omitXmlDeclaration="true" escapeText="false">
if ( a&lt;b &amp;&amp; c&gt;d )
</j;file>
I have as output: if ( a<b && c>d ) which is correct.

I have the same output if I use a variable like that:
<j:file name="myFile" omitXmlDeclaration="true" escapeText="false">
<j:set var="test" value="a&lt;b &amp;&amp; c&gt;d"/>
if ( ${test} )
</j;file>

But if the value comes from the body of the tag the output changes:
<j:file name="myFile" omitXmlDeclaration="true" escapeText="false">
<j:set var="test">a&lt;b &amp;&amp; c&gt;d</j:set>
if ( ${test} )
</j;file>
Output is : if ( a&lt;b &amp;&amp; c&gt;d )

Is that behaviour normal? Does anyone have a clue for that?

Thanks & regards




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org