The velocity engine did everything for you. If your text did not have velocity markup in it, no harm done, it just ignores it. Maybe we could use something like this. Also, VelocityContext really just wraps a HashMap, so it might be possible to take advantage of the chain's Context object.
Jexl essentially achieves the same thing with less other overhead -- it doesn't need any support for looking up templates on the filesystem or in the classpath because you are using it in a context where you expect to have the "template" (i.e. expression) as a String already. For what it's worth, the Jexl 1.0 jar file is about a third of the size of the velocity 1.4 jar.
If we were to use something more heavyweight, I'd probably prefer a proper scripting language to velocity, along the lines of David's suggestion of Rhino.
I applied Jexl to a project at work yesterday and I was again pleased with its simplicity. When I have time, I'll develop a working example for people to check out.
Joe
PS See http://jakarta.apache.org/commons/jexl/index.html#A%20Brief%20Example
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]