blob: f114816de0d82bb4f09aab6ce6345a11cba6a838 [file] [log] [blame]
<project>
<target name="simple">
<macrodef name="my.echo">
<attribute name="text"/>
<sequential>
<echo message="@{text}"/>
</sequential>
</macrodef>
<my.echo text="Hello World"/>
</target>
<target name="text">
<macrodef name="my.echo">
<attribute name="text"/>
<sequential>
<echo>@{text}</echo>
</sequential>
</macrodef>
<my.echo text="Inner Text"/>
</target>
<target name="duplicate.attribute">
<macrodef name="my.echo">
<attribute name="text"/>
<attribute name="text"/>
<sequential>
<echo>@{text}</echo>
</sequential>
</macrodef>
</target>
<target name="duplicate.element">
<macrodef name="my.echo">
<element name="text"/>
<element name="text"/>
<sequential>
<text/>
</sequential>
</macrodef>
</target>
<target name="uri">
<macrodef name="echo" uri="abc">
<attribute name="text"/>
<sequential>
<echo message="@{text}"/>
</sequential>
</macrodef>
<x:echo xmlns:x="abc" text="Hello World"/>
</target>
<target name="nested">
<macrodef name="nested">
<element name="nested"/>
<sequential>
<nested/>
</sequential>
</macrodef>
<nested>
<nested>
<echo>A nested element</echo>
</nested>
</nested>
</target>
<target name="double">
<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"/>
</target>
<target name="ignorecase">
<macrodef name="ignore">
<attribute name="MyAttribute"/>
<sequential>
<echo>@{myattribute} is @{MYATTRIBUTE}</echo>
</sequential>
</macrodef>
<ignore myattribute="a"/>
<ignore Myattribute="b"/>
</target>
<target name="ignore-element-case">
<macrodef name="ignore">
<element name="MyElement"/>
<sequential>
<myElement/>
<MyElEmEnT/>
</sequential>
</macrodef>
<ignore>
<MYELEMENT>
<echo>nested element</echo>
</MYELEMENT>
</ignore>
</target>
<target name="textelement">
<macrodef name="echotest">
<text name="text" optional="yes"/>
<sequential>
<echo>@{text}</echo>
</sequential>
</macrodef>
<echotest>
Hello world
</echotest>
</target>
<target name="text.trim">
<macrodef name="echotest">
<text name="text" trim="yes"/>
<sequential>
<echo>[@{text}]</echo>
</sequential>
</macrodef>
<echotest>
Hello world
</echotest>
</target>
<target name="duplicatetextname">
<macrodef name="echotest">
<attribute name="text"/>
<text name="text"/>
<sequential>
<echo>@{text}</echo>
</sequential>
</macrodef>
</target>
<target name="duplicatetextname2">
<macrodef name="echotest">
<text name="text"/>
<attribute name="text"/>
<sequential>
<echo>@{text}</echo>
</sequential>
</macrodef>
</target>
</project>