Jing

A RELAX NG validator in Java

Copyright © 2001 Thai Open Source Software Center Ltd

See the file copying.txt for copying permission.

Version @VERSION@

This version of Jing implements the 11 August 2001 version of the RELAX NG Specification.

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.

Jing uses a vendor-independent Java interface for RELAX NG datatype libraries, developed by James Clark and KAWAGUCHI Kohsuke and hosted at SourceForge in the relaxng project. Jing can use any datatype library that implements this interface. For more information on creating your own datatype libraries, including a sample, download datatype-sample.zip.

Jing also includes an implementation of a datatype library for the W3C XML Schema Part 2 datatypes.

The source is also available.

There is a Jing task that allows Jing to be invoked by the Ant build tool.

James Clark