diff --git a/docs/manual/CoreTasks/macrodef.html b/docs/manual/CoreTasks/macrodef.html index 4257ca40c..f94d02a82 100644 --- a/docs/manual/CoreTasks/macrodef.html +++ b/docs/manual/CoreTasks/macrodef.html @@ -1,5 +1,5 @@ - +
- This defines a new task using a <sequential> + This defines a new task using a <sequential> nested task as a template. Nested elements <attribute> and <element> are used to specify attributes and elements of the new task. These get substituted into the <sequential> task when the new task is run.
++ You can also use prior defined attributes for default-values in + other attributes. See the examples. +
since Ant 1.6
@@ -183,7 +188,7 @@The following example defined a task called testing and @@ -264,6 +269,26 @@ <echotest> Hello world </echotest> + + +
+ The following uses a prior defined attribut for setting the + default value of another. The output would be + one=test two=test. If you change the order of lines + *1 and *2 the output would be one=test two=@{one}, + because while processing the two-line the value for + one is not set. +
+++<macrodef name="test"/> + <attribute name="one"/> *1 + <attribute name="two" default="@{one}"/> *2 + <sequential> + <echo>one=@{one} two=@{two}</echo> + </sequential> +</macrodef/> +<test one="test"/>