James Clark has announced a new version of Jing with significant changes and revised documentation. Jing version '2002-02-13' implements the final RELAX NG 1.0 Specification and also implements parts of RELAX NG DTD Compatibility, specifically checking of ID/IDREF/IDREFS. James has "almost completely rewritten the validator using an improved algorithm. In the old algorithm, the state of the validation was represented by a stack of sets of patterns; in the new algorithm, the state is represented by a single pattern... The new release includes a documented API for Jing; in fact there are two APIs, a native API and JARV. James has rewritten the description of derivative-based validation to correspond to what's been implemented and to incorporate feedback received on the previous version from Murata-san and Kawaguchi-san... The Jing implementation is available for download as a JAR file and as a Win32 executable for use with the Microsoft Java VM.
The document Algorithm for RELAX NG validation "describes an algorithm for validating an XML document against a RELAX NG schema. This algorithm is based on the idea of what's called a derivative (sometimes called a residual). It is not the only possible algorithm for RELAX NG validation. This document does not describe any algorithms for transforming a RELAX NG schema into simplified form, nor for determining whether a RELAX NG schema is correct. We use Haskell to describe the algorithm. Do not worry if you don't know Haskell; we use only a tiny subset which should be easily understandable..."
From the announcement: "In the old algorithm, the state of the validation was represented by a stack of sets of patterns. In the new algorithm, the state is represented by a single pattern. To enable this it introduces a new kind of pattern: x/y matches x followed by an end-tag followed by y. The old algorithm optimized the common case where there was only a single content model possible for an element of a given name. The new algorithm no longer makes this a special case; it doesn't improve significantly on this common case, but it is much more efficient for other cases. In particular, it can handle quite efficiently the case which would arise from translating W3C XML Schema, where there are many content models possible for an element name (according to the value of xsi:type)..."
Principal references:
- Announcement 2002-02-13: "Jing Update"
- Jing web site
- "RELAX NG DTD Compatibility"
- Notes on implementing RELAX NG
- An algorithm for RELAX NG validation
- OASIS RELAX NG TC web site
- "RELAX NG" - Main reference page.