commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Borut BolĨina <>
Subject Re: [Configuration] Wish list
Date Fri, 27 Jan 2006 14:36:27 GMT

On 26.1.2006 20:53, Oliver Heger wrote:
> If a schema is capable to deal with the required flexibility, it would
> be really cool to have one. However the XML can become very variable:
> One feature that is already supported is the ability of setting
> properties on the newly created Configuration objects. For instance you
> can write something like that:
> <properties fileName="..." lineDelimiter=";"
> throwExceptionOnMissing="true"/>
Hmmm. IMO setting properties like this isn't in the spirit of separating 
concerns. Putting entries in this configuration for configurations file 
(we are talking about configuration.xml aren't we?) introduces another 
place to look for keys and values. That is added complexity. It should 
be just as easy to have this entries in regular property file referenced 
by configuration.xml entry. Don't you think? What is this added value to 
justify the above example?
> Here for each property of a concrete configuration implementation a
> corresponding attribute can be specified (this is internally handled by
> Commons-Digester ATM).
> There are requests to enhance this initialization syntax to also support
> more complex objects, e.g. reloading strategies. To handle this in a
> generic way I think about implementing a mechanism that allows to
> declare arbitrary objects to be created including their initialization
> parameters.
> Could a schema handle such stuff?
There is power in XML Schema, but it has its limits. There should be 
solid base elements which have (optional) parameters and there can be 
elements for which we can not predict their names in advance. Of course 
this elements then can't be validated.

> Oliver
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message