this:
test="${string::get-length('${modifications}')
should be
test="${string::get-length(modifications)}"by using quotes you are just getting the length of the literal string
'${modifications}'note ${} syntax does not nest. '${}' excloses a complete expression and you reference
properties by name inside it - ie without re-using $ syntaxIan
Florian Benischke wrote:
Hi there,
if I do the following :
<property name="modifications" value=""/> <xmlpeek file="albwir.basis.modifications.xml"
xpath="/vssdiff/item[1]/@name" property="modifications" failonerror="false"/> <echo message="${modifications}"/> <if test="${string::get-length('${modifications}') > 1}"> <echo message="Doh! Not empty that string is! The force you must use."/> </if> <property name="modifications" value=""/> <echo message="Now empty modifications is!"/> <echo message="${modifications}"/> <if test="${string::get-length('${modifications}') > 1}"> <echo message="${string::get-length('${modifications}')}"/> <echo message="That is modifications : ${modifications}"/> </if>
Then, in the second <if>, string::get-length returns the same like before. But ${modifications} HAS changed.
Am I doing something wrong here or is this a bug? I’m using nant 0.85 nightly 2004-07-22
Cheers Florian
Mit freundlichen Grüßen
Florian Benischke Softwareentwickler Technical Applications ______________________________________ Albat + Wirsam Software-Vertriebs AG Konrad-Adenauer-Str. 15 D-35440 Linden
Tel.: +49 (0) 6403/970 - 0 http://www.a-w.de
--
Ian MacLean, Developer, ActiveState, a division of Sophos
http://www.ActiveState.com
------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users
