Hi, with antcontrib you have = ... <if> <equals arg1="${xsl.file}" arg2="interface.xsl" /> <then> <property name="pkg" value="/se/company/app/interface"/> </then> <elseif> <equals arg1="${xsl.file}" arg2="enumeration.xsl /> <then> <property name="pkg" value="/whatever/foo/bar"/> </then> </elseif> </if> ...
you may also write <if> <contains string="${ ... }" substring=" ..." casesensitive="false"/> <then> <if> ... possible to use more than one <elseif> , f.e. = <if> <contains ... /> <then> <if> <contains ... "/> <then> ... </then> <elseif> <contains ... /> <then> ... </then> </elseif> <elseif> <contains ... /> <then> ... </then> </elseif> </if> </then> </if> Gilbert -----Original Message----- From: Mikael Petterson (KI/EAB) [mailto:[EMAIL PROTECTED] Sent: Thursday, April 28, 2005 10:39 AM To: user@ant.apache.org Subject: check property Hi, In my ant build.xml I have a property called: <property name="xsl.file" value="interface.xsl"/> This can be changed when I run my build.xml ( from -Dxml.file) when starting ant. How can I check the value of 'xsl.file' and depending on the value give another poperty ('pkg') a value like: if xsl.file = interface.xsl --> pkg = /se/company/app/interface if xsl.file = enumeration.xsl --> pkg= /se/company/app/interface All hints are very much appreciated. Cheers, //Mikael --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]