velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Javier Velez <jve...@lsi.uned.es>
Subject Which variables are involved in a template?
Date Thu, 19 Oct 2006 09:37:43 GMT
Hi,

I am developing a tool using velocity. In my application the user write 
down a template and then it is evaluated within a velocity context. But 
somtimes not all variables in template are found in the context. So I 
need a mechanism to recognize which variables could not be resolved.

One solution is evaluate once the template and then parse it looking for 
string maching with $xxxx or ${xxxx}. My question is: Is there any other 
more straitforward mechanism within the velocity API that give me the 
list of unsolved variables? Or at least, is there a method in velocity 
API that returns the list of referenced variables witin a template?

Thanks in forward.

Mime
View raw message