B.17 DependSet

The dependset task compares a set of sources with a set of target files. If any of the sources has been modified more recently than any of the target files, all of the target files are removed.

B.17.1 Examples

<dependset>
    <srcfilelist
        dir   = "${dtd.dir}"
        files = "paper.dtd,common.dtd"/>
    <srcfilelist
        dir   = "${xsl.dir}"
        files = "common.xsl"/>
    <srcfilelist
        dir   = "${basedir}"
        files = "build.xml"/>
    <targetfileset
        dir      = "${output.dir}"
        includes = "**/*.html"/>
</dependset>

In this example derived HTML files in the ${output.dir} directory will be removed if any are out-of-date with respect to:

  • the DTD of their source XML files

  • a common DTD (imported by the main DTD)

  • a subordinate XSLT stylesheet (imported by the main stylesheet), or

  • the buildfile

If any of the sources in the above example does not exist, all target files will also be removed. To ignore missing sources instead, use filesets instead of filelists for the sources.

B.17.2 Supported Nested Tags