Copyright © 2001 Thai Open Source Software Center Ltd
See the file copying.txt for copying permission.
The implementation is available for download as a JAR file and as a Win32 executable for use with the Microsoft Java VM.
To invoke the Win32 executable, simply copy jing.exe
to a directory in your path and run the command
jing file.rng file.xml
This will report errors if file.xml does
not match file.rng. You can specify multiple
XML files to be validated in a single command.
To use Jing packaged as a JAR file, you must have an implementation
of the Java API for XML Processing
(JAXP) 1.1 in your CLASSPATH. The main class for Jing is
com.thaiopensource.relaxng.util.Driver. The first
argument expected by the main class is the name of the file containing
the RELAX NG schema. The second and subsequent arguments are the
names of one or more files to be validated against this schema. So,
for example, on Windows, the command:
c:\jdk1.3\bin\java -cp c:\lib\jing.jar;c:\lib\jaxp.jar;c:\lib\crimson.jar com.thaiopensource.relaxng.util.Driver doc.rng doc.xml
would validate the XML document contained in doc.xml
against the RELAX NG schema contained in doc.rng.Obviously,
you must replace c:\lib by the path to the directory
where you have put the various JAR files. The command will be
slightly different on non-Windows machines. Consult your Java
documentation.
The implementation supports datatypes from XML Schema Part 2.
The source is also available.
There is a Jing task that allows Jing to be invoked by the Ant build tool.
James Clark