Hmm... it seems the if/unless isn't working on the replacetokens
either... I tested by just putting in true or false to make sure.
BOb
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bob
Archer
Sent: Thursday, December 27, 2007 5:47 PM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Empty string in Filterchange replace value
Ok,
I just realized I can use replacestring to change the token to an empty
string.
I also realized I can use multiple replacetokens tags... however, is the
if supposed to work on that tag? Maybe I am doing the if wrong. I am
doing:
<replacetokens
if="${property::exists('Private.DbGhost.AdhocScriptElement')}">
<token key="ADDHOCSCRIPTS"
value="${Private.DbGhost.AdhocScriptElement}" />
</replacetokens>
However, I am getting this error... which I thought I was avoiding with
the if:
Expression: ${Private.DbGhost.AdhocScriptElement}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Property 'Private.DbGhost.AdhocScriptElement' has not been set.
Any ideas?
BOb
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bob
Archer
Sent: Thursday, December 27, 2007 3:56 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Empty string in Filterchange replace value
Is there a way to specify an empty string / or nothing in a replacetoken
of a filter change:
When I do this:
<token key="MYKEY" value="" /> (or an empty property)
I get an error:
'' is not a valid value for attribute 'value' of <token ... />.
When I put in '' to perhaps be an empty string, it actually puts in the
single quotes.
So, my text file is XML... like this:
<MyTag>@MYTOKEN@</MyTag>
And after doing the copy I want (at times) this:
<MyTag></MyTag>
Also, I am told I can't put an <if> tag in the replacetokens tags.
However, there are times when I don't want to replace certain tokens (of
course if I could blank them that would probably solve this.) The if and
unless do not seem to work on the <token> tags.
Would appreciate and help or pointer to some doc that I might be
missing.
Thanks,
BOb
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users