Schema, Parsers, validators - Java
An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntax constraints imposed by XML itself. An XML schema provides a view of the document type at a relatively high level of abstraction.
From : en.wikipedia.org/wiki/XML_schema
Bali
Bali is a "RELAX NG validator compiler" that reads a RELAX NG schema and produces a validator that can validate documents with the given schema.
For example, Bali can read a XHTML schema at the compile time, and it produces XHTMLValidatelet.java, which is a Java source code. Then you compile this file along with your other source code, and at the runtime this class can be used to validate XHTML documents before you process it.
Compared to general-purpose validators, such as MSV and Jing, this approach has the following benefits:
1. Bali can produce a validator in various programming languages, which makes it easy to use RELAX NG in those platforms that don't have general purpose RELAX NG validator implementations.
2. Generated validator is usually small compared to a general-purpose RELAX NG validator, both in terms of the runtime memory consumption and the code size.
3. Generated validator (is expected to) run faster than general-purpose validators.
visit
Bali
Bali was visited : 102 times
Loading .....