You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Marc DEXET <Ma...@dsi.cnrs.fr> on 2005/01/25 18:28:26 UTC
RE : RE : RE : [jelly] SetTag and XML entities
Ze answer is in documentation :)
http://jakarta.apache.org/commons/jelly/apidocs/org/apache/commons/jelly/tag
s/core/SetTag.html#setEncode(boolean)
try this, it works :
<j:jelly xmlns:j="jelly:core">
<j:file name="myFile.txt" omitXmlDeclaration="true" escapeText="false">
<j:set var="test" encode="false">a<b && c>d</j:set>
if ( ${test} )
</j:file>
</j:jelly>
--
Marc DeXeT
CNRS
- I put it to jelly.fr -
> -----Message d'origine-----
> De : Jean-Michel FRANCOIS [mailto:jmf@mururoa.com]
> Envoyé : mardi 25 janvier 2005 18:00
> À : commons-user@jakarta.apache.org
> Objet : Re: RE : RE : [jelly] SetTag and XML entities
>
> > And with :
> >
> > <j:file name="myFile" omitXmlDeclaration="true" escapeText="false">
> > <j:set var="test" escapeText="false">a<b && c>d</j:set>
> > if ( ${test} )
> > </j;file>
> >
> > set inherits from tagSupport, which accepts escapeText as filetag.
> >
> In that case the escapeText attribute with a value of false do nothing
> and with a value of true will output for the above code:
> if ( a&lt;b &amp;&amp; c&gt;d )
> Actually, it permits to convert XML characters to entities. In our case,
> the XML character is '&' which becomes '&'.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: RE : RE : RE : [jelly] SetTag and XML entities
Posted by Jean-Michel FRANCOIS <jm...@mururoa.com>.
Bingo!
> Ze answer is in documentation :)
Right, and I read it before ask....(not proud of that)
Thanks for your help
See you on http://jelly.fr.free.fr/index.php
>
> http://jakarta.apache.org/commons/jelly/apidocs/org/apache/commons/jelly/tag
> s/core/SetTag.html#setEncode(boolean)
>
> try this, it works :
>
> <j:jelly xmlns:j="jelly:core">
> <j:file name="myFile.txt" omitXmlDeclaration="true" escapeText="false">
> <j:set var="test" encode="false">a<b && c>d</j:set>
> if ( ${test} )
> </j:file>
> </j:jelly>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org