added task to validate XML files

This commit is contained in:
Rick Giles 2002-11-13 00:08:34 +00:00
parent 6f36f2811d
commit 113081ffce
1 changed files with 19 additions and 0 deletions

View File

@ -600,4 +600,23 @@
</java>
</target>
<!-- Targets to verify that Xerces is in the classpath -->
<target name="check.xerces"
description="Checks whether xerces is in the classpath">
<condition property="have.xerces">
<available classname="org.apache.xerces.parsers.SAXParser"/>
</condition>
</target>
<target name="require.xerces" depends="check.xerces" unless="have.xerces"
description="Fails if xerces is not present in the classpath">
<fail message="Need to have Xerces-J in your CLASSPATH to run the tests. You can download it from http://xml.apache.org/."/>
</target>
<target name="validate.xml"
depends="require.xerces"
description="Validates checkstyle XML file">
<xmlvalidate file="docs/checkstyle_checks.xml"/>
</target>
</project>