A RELAX NG validator in Java

Copyright © 2001, 2002, 2003 Thai Open Source Software Center Ltd

See the file copying.html for copying permission.

Version 20030619

This version of Jing implements

Jing also has experimental support for schema languages other than RELAX NG; specifically

A separate document describes this support in more detail.

Jing is available in the download directory in a number of different forms:

the main Jing distribution for use with a Java Runtime Environment, including binaries, source code, documentation
a Win32 executable for use with the Microsoft Java VM
source code packaged for compilation with GCJ (GNU Compiler for Java)
RPM for Linux compiled with GCJ
source RPM for Linux for compilation with GCJ

The main class is com.thaiopensource.relaxng.util.Driver. The first argument expected by the main class is the name of the file containing the schema. The second and subsequent arguments are the names of one or more files to be validated against this schema.

Jing accepts the following command-line options, which must precede the arguments specifying the schema and files to be validated:

The schema uses RELAX NG Compact Syntax.
-e enc
Uses the encoding enc to read the schema.
Checks that the document is feasibly valid. A document is feasibly valid if it could be transformed into a valid document by inserting any number of attributes and child elements anywhere in the tree. This is equivalent to transforming the schema by wrapping every data, list, element and attribute element in an optional element and then validating against the transformed schema. This option may be useful while a document is still under construction. This option also disables checking that for every IDREF there is a corresponding ID.
Disables checking of ID/IDREF/IDREFS. By default, Jing enforces the constraints imposed by RELAX NG DTD Compatibility with respect to ID/IDREF/IDREFS.
Prints the time used by Jing for loading the schema and for validation.

Jing uses a vendor-independent pluggable datatypes API that allows datatype libraries to be added at runtime and be interoperable with Java-based RELAX NG implementation that supports the API.

Jing also includes an implementation of a datatype library for the W3C XML Schema Part 2 datatypes. There is a separate document describing this implementation and how to use it.

If you wish to use Jing in your programs, you have a choice.

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

James Clark