Introduction
RELAX NG is a schema language for XML, specified by an OASIS committee in 2001. A schema
describes the elements, attributes and text that a kind of XML document may contain. A schema
can be written in an XML syntax, in files with the extension .rng, or in a
shorter non-XML compact syntax, in files with the extension .rnc.
Structure
A schema in the XML syntax is itself an XML document, whose elements are in the namespace
http://relaxng.org/ns/structure/1.0. The compact syntax writes the same
patterns with keywords and braces, for example:
element addressBook {
element card {
element name { text },
element email { text }
}*
}
Not described
This page is a first outline. The format is not yet described in full here.
Known, not yet covered
- Reference: the patterns, name classes, datatypes and annotations of both syntaxes, and the simplification rules of the specification.
- Viewer: the site has no viewer for this format.
Links
Software
- Trang – converts RELAX NG schemas to other schema forms, such as DTD
- Jing – RELAX NG validator
Reference
- RELAX NG Specification – the OASIS committee specification of 3 December 2001
- RELAX NG Compact Syntax – the committee specification of 21 November 2002
- RELAX NG Tutorial – introduction with example schemas
- Compact Syntax Tutorial – the same for the compact syntax
- RELAX NG – Wikipedia’s summary