RELAX NG (REgular LAnguage for XML Next Generation)


RELAX NG is a schema language that can be used for validating XML documents. It specifies what elements and attributes are allowed within a given document type, and how those elements may be combined. It performs essentially the same function as XSD (the XML Schema language defined by the W3C) but is considered by many to be both simpler and more flexible.

There are two different, but semantically equivalent notations that can be used to represent the content of a RELAX NG schema:

Schema files are normally given the a file extension of rng if they use XML syntax or rnc for compact syntax.

Validation against a RELAX NG schema can be performed using a program such as xmllint (XML syntax only), Jing (either syntax) or RNV (compact syntax only). Conversion between XML and compact syntax can be performed using the program Trang.


See also

Further reading