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 Jing task for Ant allows you to efficiently validate multiple files against multiple RELAX NG patterns and integrate RELAX NG validation with other XML processing.
This version of the Jing task has bee tested with version 1.7.1 of Ant.
To use the Jing task, you must include a
in your project file.
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"/>
jing task has a required
attribute which specifies the file containing the RELAX NG pattern. The
files to be validated can be specified in two ways: the
jing element may have a
specifying a single file to be validated; alternatively, the
jing element may have one or more
child elements specifying sets of files to be validated. For
<project name="example" default="validate" basedir="."> <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"/> <target name="validate"> <jing rngfile="xslt.rng"> <fileset dir="xsl" includes="**/*.xsl"/> </jing> </target> </project>
jing task also has two optional boolean attributes:
When invoking Ant, you must ensure that
jing.jar is in
your class path.