RELAX NG

RELAX NG is a simple yet elegant schema language for XML. It was developed at OASIS under the leadership of James Clark and Murata Makoto and grew out of earlier efforts on the schema languages TREX (by Clark) and RELAX (by Murata). After becoming an OASIS committee specification in late 2001, RELAX NG was later standardized under ISO’s Document Schema Definition Languages (DSDL) effort as ISO/IEC 19757-2.

RELAX NG is easy to learn, easy to use, and is supported by a broad variety of free tools. It can be expressed in XML syntax or in a compact, non-XML syntax. Its use is certainly not as widespread as W3C XML Schema, but RELAX NG continues to be a favorite among XML experts.

The RELAX NG XML-syntax tutorial is at http://relaxng.org/tutorial-20011203.html; the compact-syntax tutorial is at http://relaxng.org/compact-tutorial-20030326.html; and the specification is at http://relaxng.org/spec-20011203.html. For more information, see http://relaxng.org and http://dsdl.org. Eric van der Vlist’s RELAX NG (O’Reilly) is also an excellent resource (an online version is available at http://books.xmlschemata.org/relaxng/). The following material is intended for quick reference on usage and syntax. For a complete, detailed reference, I recommend Chapters 17 and 18 of van der Vlist’s RELAX NG.

The following RELAX NG reference is organized by XML element name; an associated compact syntax is provided in an example for each. The element names in headings are prefixed with rng: to distinguish ...

Get XML Pocket Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.