On Monday, October 20, 2003, at 05:16 PM, Craig R. McClanahan wrote:

Remy Maucherat wrote:

Hi,

I'd like to add a feature to the digester, allowing property replacement,
similar to Ant. Basically, ${...} in an attribute value would get replaced by a property value.


The following elements would be added:

* PropertySource interface, containing a String getProperty(String key) method

* Digester.setPropertySources(PropertySource[] sources), which would:
- enable property replacement (this would be disable otherwise, for 100% compatibility)
- use the sources in the given order until one returns a non null value; if all return null, no replacement occurs


The implementation is very simple, and the code is present in the Tomcat sources.

This would allow nice dynamic integration capabilities for files a container which XML files are parsed by the digester, and (more generally) will allow cool Ant-like properties management.

I can commit a patch if the feature is considered useful (the Tomcat community certainly did like it).

Comments ?

As I mentioned on TOMCAT-DEV, I'm +1 for this as long as the default behavior is backwards compatible (as Remy proposes it to be).

+1 as long as the default behaviour is backwards compatible.


BTW remy - if you want to commit this yourself please remember to add yourself to the STATUS.html. (that way, your digester VOTEs will be binding in future.)

- robert


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



Reply via email to