Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 24154 invoked from network); 30 Nov 2006 10:22:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Nov 2006 10:22:53 -0000 Received: (qmail 46614 invoked by uid 500); 30 Nov 2006 10:22:58 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 46230 invoked by uid 500); 30 Nov 2006 10:22:56 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 46218 invoked by uid 99); 30 Nov 2006 10:22:56 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Nov 2006 02:22:56 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [217.175.51.62] (HELO mailfilter02.sogei.it) (217.175.51.62) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Nov 2006 02:22:43 -0800 Received: from MAILBOX02.domus.ad.sogei.it ([26.2.193.135]) by SIA-FE1-CH5B01.domus.ad.sogei.it with Microsoft SMTPSVC(6.0.3790.1830); Thu, 30 Nov 2006 11:22:18 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Variable interpolation in composite configuration Date: Thu, 30 Nov 2006 11:22:17 +0100 Message-ID: <299BDCCE4001334C85410328E67B8799B7F658@MAILBOX02.domus.ad.sogei.it> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Variable interpolation in composite configuration Thread-Index: AccT/wxjM3luGeixReCwZszW3Y0kSwAYiIYA From: "MASTRELLA STEFANO" To: "Jakarta Commons Users List" X-OriginalArrivalTime: 30 Nov 2006 10:22:18.0745 (UTC) FILETIME=[6A185690:01C71469] X-TM-AS-Product-Ver: SMEX-7.0.0.1499-3.52.1006-14844.001 X-TM-AS-Result: No--0.654400-0.000000-31 X-Virus-Checked: Checked by ClamAV on apache.org Hi everybody, What I need to is to reference some key in a configuration file from another config file. As an example cosider to have this configuration file for the CompositeConfiguration **********************composite-config.xml********************** and the following configuration file specified above **********************config1.properties********************** key1.property=3D1 ********************** config2.xml ********************** As the CompositeConfiguration load first the cofig1.properties when I try to look for the key "value[@name]" or "value/@name" (xpath version) with this snippet of code ConfigurationFactory factory =3D new ConfigurationFactory(); URL configURL =3D new File("config-composite.xml").toURL(); factory.setConfigurationURL(configURL); Configuration config =3D factory.getConfiguration(); String prop =3D config.getString("value[@name]"); I'd expected to see the value "1" as defined in config.properties, instead of ${key1.property}. Is there any mistakes in what I thought? There's something more to do for variable interpolation? TIA --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org