# oNVDL

## oNVDL - NVDL implementation based on Jing, a RELAX NG validator in Java

Copyright © 2006-2007 Syncro Soft Ltd.

See the file licenses/onvdl.html for copying permission.

### Version 20070517

This version adds an XSLT 2.0 implementation of the NVDL dispatching part and also few fixes since version 20070122

- Initialize the log4j system from the code in case there is no log4j.configuration file in classpath.
- Dump the ns attribute on nsName in PatternDumper.
- Handle InputSource objects with character stream in AutoSchemaReader.
- XSLT implementation of NVDL dispatching
  Except the following:
  - Point 8.6. Stage 4: Filtering of the combined sections (from the specification)
  - Support for cancelNestedActions.
  - Support for included modes.
- Avoid a StackOverflowError if validate/@schema was empty.
- Fix handling of attribute sections.
- Perform schema rewriting to validate attribute sections for XML Schema.
- Started work on adding ISO Schematron support.

### Version 20070122

This version adds a few fixes since version 20061115 and updates Xerces to Xerces 2.9.0

- The message element was rejected, reporting that it is not allowed - fixed.
- Revert the change made on Jing to handle any of the pattern constraits, as XML Schema, now it checks against all the pattern constraints because Relax NG specifically require this behavior.
- Update Xerces to Xerces 2.9.0
- Use the EntityResolver if specified in the AutoSchemaReader class.

### Version 20061115

This version of oNVDL is based on Jing version 20030619 and inherits all Jing support adding support for NVDL and a couple of fixes, specifically the oNVDL changes Jing as follows

- Adds NVDL support.
- Updates the support for Xerces to work with Xerces 2.8.0.
- Updates Saxon to Saxon 6.5.5.
- Handles correctly the XML Schema pattern facet by checking against any of the patterns.
- Removes the Xerces J 1 Regular Expression Engine implementation (com/thaiopensource/datatype/xsd/regex/xerces/RegexEngineImpl.java).

oNVDL implements

- NVDL Specification (except support for inline schemas)

oNVDL inherits from Jing support for

- RELAX NG 1.0 Specification,
- RELAX NG Compact Syntax, and
- parts of RELAX NG DTD Compatibility, specifically checking of ID/IDREF/IDREFS.

oNVDL inherits from Jing also support for schema languages other than NVDL and RELAX NG; specifically

- W3C XML Schema (based on Xerces-J);
- Schematron;
- Namespace Routing Language.

A separate document describes this support in more detail.

oNVDL is available for download as onvdl-version.zip - including binaries, source code, documentation.

The main class is the same as for Jing, `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.

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

`-c`
  The schema uses RELAX NG Compact Syntax.
`-e enc`
  Uses the encoding `enc` to read the schema.
`-f`
  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.
`-i`
  Disables checking of ID/IDREF/IDREFS. By default, Jing enforces the constraints imposed by RELAX NG DTD Compatibility with respect to ID/IDREF/IDREFS.
`-t`
  Prints the time used by oNVDL for loading the schema and for validation.

oNVDL API documentation is available from here.

For more information about Jing see jing.html.