W3C

The MathML Schema

MathML Home

The MathML 3 Schema

The MathML3 Schema normative Relax NG grammar presented in Appendix A of the MathML 3 specification. It also incororporates any fixes noted in the Editors' draft of MathML3.

mathml3.rnc

This is the top level file. It ncludes several other schema files, as decribed in the MathML specification.

mathml3.rng

The Schema in XML syntax

mathml3-relaxng.zip

A zip file including all the rnc and rng files.

Modified Schema

The canonical MathML schema presented above may be customised in several ways. Chapter 6 of the MathML Recommendation includes an example showing how the customisation features of RelaxNG may be used to produce a more open schema that allows markup within mtext. (A Schema corresponding to mathML-in-HTML5 would want to allow HTML in all the Presentation MathML token elements in a similar way.).

Sometimes it is nore convenient to use the fact that RNG's XML syntax may be manipulated using XML tools to generate a modified schema, rather than using the Relax NG customisation features. An example is presented below.

MathML3 Restricted

mathml3-restricted is a version of the schema with all element and attribute names introduced at MathML3 removed (by applying the XSLT stylesheet included in the directory). This makes it usable as a schema for MathMl2, but benefitting from the stricter attribute typing specified in the MathML3 specifcation. It differs from MathML2 in some respects notably on the exact lists of attributes allowed on each element, as it follows MathML3 usage, however the similarity to MathML3 helps maintance, and may help users migrating from MathML2 to MathML3.


Maintained by: David Carlisle for the W3C Math working group