ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: macrodef - do attributes as properties or substitutions
Date Mon, 17 Nov 2003 16:04:49 GMT
On Fri, 14 Nov 2003, Jan Materne <Jan.Materne@rzf.fin-nrw.de> wrote:

> <macrodef name="macro">
>     <attribute name="one"/>
>     <attribute name="two" default="${one}"/>
> </macrodef>
> <macro one="hello"/>

I don't think we should need any special cludges just to support this
usecase. 8-)

Give two a completely bogus, impossible to be used in any real world
usage value and check for that.  Should be easier than comparing it to
a literal ${one} or @one or whathever.

<macrodef name="macro">
    <attribute name="one"/>
    <attribute name="two" 
      default="nobody-with-a-sane-mind-would-ever-want-to-use-this-value"/>
</macrodef>

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message