Kevin, don't nest the expression tag ${} ie use:
${string::contains(db.type,'oracle')} instead of: ${string::contains('${db.type}','oracle')}
${} now denotes an expression rather than just a property and to use a property inside an expression just use its name. If the expression consists of nothing but a property name then the value of that property will be returned. So : ${somefunc(foo)} says perform some function on property named foo returning the result and: ${foo} says return the value of foo
I hope that makes it a little clearer. Proably somthing to put in the FAQ
Ian
Kevin wrote:
Can any of you elite NAnt expression creators out there help me out?
I am trying to do a simple string compare against a property that is set by a parent target. If you have any suggestions as to the proper NAnt way to accomplish such things I am all ears. I am on the nightly as of 5/20/2004 of both NAnt and Contrib.
<if test="${string::contains('${db.type}','oracle')}"> <property name="connection.string" value="Provider=msdaora;Data Source=${db.servername}; User Id=${db.saname};Password=${db.sapass};" /> </if>
<if test="${ '${db.type}' = 'mssql'}"> <property name="connection.string" value="Provider=sqloledb;Data Source=${db.servername}; Initial Catalog=${db.name}; uid=${db.saname};pwd=${db.sapass};" /> </if>
Kevin Miller
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users
--
Ian MacLean, Developer, ActiveState, a division of Sophos
http://www.ActiveState.com
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users