Specifications
CHAPTER 9
186
The following example shows how to use the metadata nested element:
<mxmlc ...>
<metadata description="foo app">
<contributor name="Joe" />
<contributor name="Nick" />
</metadata>
</mxmlc>
In this example, you drop the metadata prefix when setting the description and contributor options as a
nested element.
This is a uniformly applied rule with one exception: the compiler.fonts.languages.language-range option
is set using a nested element with the name
language-range, rather than languages.language-range.
Implicit FileSets
There are many examples in the Apache Ant project where tasks behave as implicit FileSets. For example, the
delete task, while supporting additional attributes, supports all of the attributes (such as dir and includes) and
nested elements (such as
include and exclude) of a FileSet to specific the files to be deleted.
Some Flex Ant tasks allow nested attributes that are implicit FileSets. These nested attributes support all the
attributes and nested elements of an Ant FileSet while adding additional functionality. These elements are usually
used to specify repeatable arguments that take a filename as an argument.
The following example uses the implicit FileSet syntax with the
include-sources nested element:
<include-sources dir="player/avmplus/core" includes="builtin.as, Date.as, Error.as,
Math.as, RegExp.as, XML.as"/>
When a nested element in a Flex Ant task is an implicit FileSet, it supports one additional attribute: append. The
reason for this is that some repeatable options for the Flex compilers have default values. When setting these
options in a command line, you can append new values to the default value of the option, or replace the default
value with the specified values. Setting the
append value to true adds the new option to the list of existing options.
Setting the
append value to false replaces the existing options with the new option. By default, the value of the
append attribute is false in implicit FileSets.
The following example sets the value of the
append attribute to true and uses the Ant include element of an
implicit FileSet to add multiple SWC files to the
include-libraries option:
<compiler.include-libraries dir="${swf.output}" append="true">
<include name="MyComponents.swc" />
<include name="AcmeComponents.swc" />
<include name="DharmaComponents.swc" />
</compiler.include-libraries>










