Parsing MathML

Issue 178

Issue 361

Using the RelaxNG Schema for MathML

MathML documents should be validated using the RelaxNG Schema for MathML, either in the XML encoding (http://www.w3.org/Math/RelaxNG/mathml4/mathml4.rng) or in compact notation (https://www.w3.org/Math/RelaxNG/mathml4/mathml4.rnc) which is also shown below.

In contrast to DTDs there is no in-document method to associate a RelaxNG schema with a document.

MathML Core

MathML Core is specified in [[[MathML-Core]]] however the Schema is developed alongside the schema for MathML 4 and presented here, it can also be found at https://www.w3.org/Math/RelaxNG/mathml4/mathml4-core.rnc.



    

Presentation MathML

The grammar for Presentation MathML 4 builds on the grammar for the MathML Core, and can be found at https://www.w3.org/Math/RelaxNG/mathml4/mathml4-presentation.rnc.



    

Strict Content MathML

The grammar for Strict Content MathML 4 can be found at https://www.w3.org/Math/RelaxNG/mathml4/mathml4-strict-content.rnc.


    

Content MathML

The grammar for Content MathML 4 builds on the grammar for the Strict Content MathML subset, and can be found at https://www.w3.org/Math/RelaxNG/mathml4/mathml4-content.rnc.



    

Full MathML

The grammar for full MathML 4 is simply a merger of the above grammars, and can be found at https://www.w3.org/Math/RelaxNG/mathml4/mathml4.rnc.



    

Legacy MathML

Some elements and attributes that were deprecated in MathML 3 are removed from MathML 4. This schema extends the full MathML 4 schema, adding these constructs back, allowing validation of existing MathML documents. It can be found at https://www.w3.org/Math/RelaxNG/mathml4/mathml4-legacy.rnc.