RELAX NG stands for Regular Language Description for XML New Generation. It is a schema language for describing the structure and defining the elements of XML documents. RELAX NG is built originally based on TREX (Tree Regular Expressions for XML) and RELAX Core.
RELAX NG was developed by a committee specification of the OASIS RELAX NG technical committee and is ranked as international standard ISO/IEC 19757-2 within the Document Schema Definition Languages (DSDL).
Like the XML Schema (Recommendation of W3C), the RELAX NG is a schema validation language, which uses XML syntax and supports namespaces and data typing. However, the purpose of the RELAX NG was to develop an alternative to the XML Schema, which is by far not so complex and is easy to learn and to use.
RELAX NG is a valid XML and grammar-based schema language for description of class in XML documents, but is not so expansive as the XML Schema. It focuses particularly on description and validation of the structure in XML document.
The main differences between the two technologies is the description of elements. The XML schema contains almost twice as many elements as the RELAX NG schema and describes the elements in details, whereas the RelaxNG simplifies them and creates more readable definitions.
Other differences between the RELAX NG and the XML Schema are:
- RELAX NG has more ambiguity in content models and mixed content.
- In RELAX NG, elements and attributes are treated similarly.
- The elements in RELAX NG cannot be differenciated as global or local elements. However, schemata of complex blocks, such as complexType elements in XML schema, can be built by using element-and-attribute groups' syntax in RELAX NG. The complex block definition are more flexible and can be applied in various ways.
- The library type is very limited and has only two datatypes (string and token), but it can be expanded with external libraries of datatypes, for example from XML Schema.
- OASIS RELAX NG TC
Legend: | |
|
isUsedBy |
|
isBasedOn |
|
isVersionOf |