Hello,

Ant has filtering support and a number of filters through its FilterChains and FilterReaders (http://ant.apache.org/manual/CoreTypes/filterchain.html) that could be immediately useful. Maybe this could be implemented such that either Ant or generic FilterReaders could be supported.

Some kinds of filters won't be useful unless you can pass parameters to them. Unfortunately, there isn't currently a good way of passing named parameters. However, with the map support, the second argument could be a map of parameters.

In addition, it should be possible to set default properties on a filter from velocity.properties.

-Bill

Peter Romianowski wrote:
Hi,


It is nearly perfect :)

Map support isn't a major change, so I think that should go in quickly. I don't remember the filters suggestion at the moment.


I just mentioned it in a mail. A Filter would allow to "filter" :)
rendered content. An Example:

velocity.properties
-------------------
filter.whitespace = o.a.v.filter.WhitespaceFilter

VTL
---
#filter (whitespace)
  Hi     this      is something.
#end

Output
------
Hi this is something.

That would it make easy to have full whitespace suppression. Other
filters are possible (HTML-escaping & => &) IMO having such
filter-mechanism and a good set of default implementations (WS, HTML-Escaping, WS+NewLine+Tab...-Fitler ...) would make Velocity much
more powerful.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to