On Fri, 14 Nov 2003, peter reilly <[EMAIL PROTECTED]> wrote:
> On Friday 14 November 2003 14:07, Stefan Bodewig wrote:
>> On Fri, 14 Nov 2003, peter reilly <[EMAIL PROTECTED]> wrote:

>> > I do not like using a different notation for attributes.
>>
>> unless they are a different thing than properties, if I understand
>> you correctly.
> Not quite, I mean that if they are differnet from properties, a
> different notation should be used, but I do not like using a
> different notation in principle.

Message understaood, thanks.

> An example:
> <target name="s">
>   <macrodef name="show">
>    <element name="x"/>
>    <sequential>
>        <property name="inmacro" value="Set in macro"/>
>        <x/>
>    </sequential>
>   </macrodef>
> 
>   <show>
>     <x>
>       <echo>inmacro is '${inmacro}'</echo>
>     </x>
>   </show>
> </target>
> This shows:
> 
> s:
> inmacro is 'Set in macro'
> 
> It would be very difficult to stop this.

So we must ask outselves whether this is good or bad for us.

If the property inmacro has been defined before the macro invocation,
the task inside the macro will be a noop - the user gets the expected
behavior.

If it has not been set, well, this might come unexpected.

But there will never be any double expansion, right?  I mean, 

      <echo>inmacro is '$${inmacro}'</echo>

would always result in 

> s:
> inmacro is '${inmacro}'

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to