commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Barrett" <JBarr...@sawyermedia.com>
Subject RE: [Configuration] referencing other properties
Date Tue, 21 Jan 2003 02:26:04 GMT
Turns out this is implemented already.  Check out: org.apache.commons.configuration.BaseConfiguration.interpolate()

+jeff

-----Original Message-----
From: Kelvin Tan [mailto:kelvin-lists@relevanz.com]
Sent: Wednesday, January 15, 2003 4:01 PM
To: Jakarta Commons Users List
Subject: Re: [Configuration] referencing other properties


Good question. How about extrapolating this to XmlConfig too, ie

<root>
<foo>
<barOne>blah</barOne>
<barTwo>${foo.barOne}</barOne>
</foo>
</root>

or alternatively, with context-awareness

<root>
<foo>
<barOne>blah</barOne>
<barTwo>${barOne}</barOne>
</foo>
<fooToo>
<barToo>${foo.barOne}</barToo>
<fooToo>
</root>

I can see how Jelly would work for the first, but not the second. But 
perhaps Jelly is a little overkill for this? *shrug* If we don't use 
Jelly, though, this would involve string-checking and replacement, 
no?

Kelvin

--------
The book giving manifesto     - http://how.to/sharethisbook

On Wed, 15 Jan 2003 15:28:09 -0800, Jeff Barrett said:
>Is there any reason, besides noone having gotten around to it, for
>commons-configuration to support properties like so?:
>
>home.dir=/home/jbarrett local.dir=${home.dir}/usr/local
>
>I know maven's properties file supports this, seemingly by building
>on some JellyContext functionality.  This may or may not be
>extractable (I didn't look too deeply).
>
>
>--
>To unsubscribe, e-mail:   <mailto:commons-user-
>unsubscribe@jakarta.apache.org> For additional commands, e-mail:
><mailto:commons-user-
>help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:commons-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-user-help@jakarta.apache.org>


Mime
View raw message