Show all info regardless research infrastructures. Switch to CLARIN environment and show only relevant info to CLARIN, e.g. format recommendations by CLARIN centres. Switch to Text+ environment and show only relevant info to Text+, e.g. format recommendations by Text+ centres. Switch to DARIAH environment and show only relevant info to DARIAH, e.g. format recommendations by DARIAH centres.
REgular LAnguage for XML Next Generation
Abbreviation: RELAX NG
Scope: Regular Grammar-based constraint language for defining document grammars for XML markup languages.
Topic: Constraint Language
Standard body: ISO

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.
Related Standard(s):
Other standards in the same topic(s):

Version Title: RELAX NG Specification
Abbreviation: RELAX NG-2001 [not official, only for reference in this website]
Version Number: Committee Specification
Status: OASIS Standard
Release Date: 2001-12-03
Version Title: Information technology — Document Schema Definition Language (DSDL) – Part 2: Regular-grammar-based validation
Abbreviation: RELAX NG-ISO [not official, only for reference in this website]
Version Number: ISO/IEC 19757-2:2008
Status: International Standard
Release Date: 2008-12-10
  1. ISO/JTC 1/SC 34/WG 1
Used in CLARIN centre(s):