cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre-Yves Chauveau <py_chauv...@yahoo.com>
Subject Re: Velocity Generator and escaping xml with velocity tools
Date Thu, 07 Sep 2006 13:59:42 GMT
Actually I found a much more simple way to escape XML
stuff in a velocity page: I use directly the
StringEscapeUtils class as a bean in the velocity page
:
 #set ($escape =
$request.getClass().forName(org.apache.commons.lang.StringEscapeUtils).newInstance())
 
and then use it directly :
$escape.escapeXML($foo)

Hope can help for someone else :-) !
-py

--- py_chauveau@yahoo.com <py_chauveau@yahoo.com>
wrote:
> Hello,
> I am using a velocity template along with the
velocity
> generator with cocoon 2.1.9.
> And I encounter an issue when desplaying non XML
> characters like &.
> earching on the mailing list I I found that an issue
> has been created for that :
> http://issues.apache.org/jira/browse/COCOON-1657 and
I
> understand that velocity is not XML-aware. So I
> planned on using the EscapeTool from velocity-tools
> that can escape XML data, but it cannot be
integrated
> with the VelocityGenerator.
> So should I create my own VelocityGenerator that
> integrate the velocity tools, or is there a simple
way
> to do that ?
> 
> Thanks,
> 
> -py
> 
> 
> 
> 	
> 
> 	
> 		
>
___________________________________________________________________________

> Découvrez un nouveau moyen de poser toutes vos
questions quelque soit le sujet ! 
> Yahoo! Questions/Réponses pour partager vos
connaissances, vos opinions et vos expériences. 
> http://fr.answers.yahoo.com 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
users-help@cocoon.apache.org
> 



	

	
		
___________________________________________________________________________ 
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! 
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.

http://fr.answers.yahoo.com 


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


Mime
View raw message