Ant is a Java based build tool, which is becoming the build tool of choice for Java-based projects. Ant project files are written in XML.
Ant can be extended with new tasks. The TREX task for Ant allows you to efficiently validate multiple files against multiple TREX patterns and integrate TREX validation with other XML processing.
This version of the TREX task is for version 1.2 of Ant.
To use the TREX task, you must include a
in your project file.
<taskdef name="trex" classname="com.thaiopensource.trex.util.TrexTask"/>
trex task has a required
attribute which specifies the file containing the TREX pattern. The
files to be validated can be specified in two ways: the
trex element may have a
specifying a single file to be validated; alternatively, the
trex element may have one or more
child elements specifying sets of files to be validated. For
<project name="example" default="validate" basedir="."> <taskdef name="trex" classname="com.thaiopensource.trex.util.TrexTask"/> <target name="validate"> <trex trexfile="trex/xslt.trex"> <fileset dir="xsl" includes="**/*.xsl"/> </trex> </target> </project>
When invoking Ant, you must ensure that
trex.jar is in
your class path, along with a jar file containing the SAX2