The OASIS DITA Technical Committee uses the RELAX NG XML syntax for the normative versions of the XML grammar files that comprise the DITA release.
The DITA Technical Committee chose the RELAX NG XML syntax for the following reasons:
The foreign vocabulary feature also can be used to include Schematron rules directly in RELAX NG grammars. Schematron rules can check for patterns that either are not expressible with RELAX NG directly or that would be difficult to express.
<div>
element <div>
element does not affect the meaning of the patterns that
are defined in a RELAX NG schema.If you plan to generate DTD- or XSD-based modules from RELAX NG modules, avoid RELAX NG features that cannot be translated into DTD or XSD constructs. When RELAX NG is used directly for DITA document validation, the document-type shells for those documents can integrate constraint modules that use the full power of RELAX NG to enforce constraints that cannot be enforced by DTDs or XSDs. The grammar files provided by the OASIS DITA Technical Committee do not use any features of RELAX NG that cannot be translated into equivalent DTD or XSD constructs.
The DITA use of RELAX NG depends on the RELAX NG DTD Compatibility
specification, which provides a mechanism for defining default attribute values and embedded
documentation. Processors that use RELAX NG for DITA documents in which required attributes
(for example, the @domains
and @class
attributes) are not
explicitly present must implement the DTD compatibility specification in order to get default
attribute values.