ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: Macrodef @{x}
Date Wed, 03 Dec 2003 14:01:39 GMT

This is offtopic from the macrodef change, but the xml-apis.jar seems to 
have mysteriously reverted to a much older one.  Even recently it had been 
the one from Xerces-2.6.0.  xercesImpl.jar *is* from 2.6.0, but 
xml-apis.jar is from back in 2002.  It should be 122k and is only 106k 
right now.  Better make sure that gets changed before the next beta.

Jake

At 01:37 PM 12/3/2003 +0000, you wrote:
>I have committed the changes to change from ${x} to @{x} for
>macro attributes substitution.
>
>Usage of macrodef is now as follows:
><macrodef name="example">
>   <attribute name="x"/>
>   <sequential>
>      <echo>The attribute has the value '@{x}'</echo>
>  </sequential>
></macrodef>
>
>This can be called as follows:
><example x="a value"/>
>
>The escape sequence @@{ may be used to escape the substitution:
>
><macrodef name="example">
>   <attribute name="x"/>
>   <sequential>
>      <echo>The attribute @@{x} has the value '@{x}'</echo>
>  </sequential>
></macrodef>
>
><example x="a value"/>
>
>Will result in:
>     [echo] The attribute @{x} has the value 'a value'
>
>The mechanisms for substition are different for properties and
>macrodef attributes so one may now do the following:
>
>    <macrodef name="double">
>      <attribute name="prop"/>
>      <sequential>
>        <echo>@@{prop} is '@{prop}', value of $${@{prop}} is 
> '${@{prop}}'</echo>
>      </sequential>
>    </macrodef>
>    <property name="property" value="A property value"/>
>    <double prop="property"/>
>
>resulting in:
>     [echo] @{prop} is 'property', value of ${property} is 'A property value'
>
>These changes will be available for the next ant 1.6 beta build.
>
>Peter
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org


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


Mime
View raw message