OpenMath defines several XML formats, in particular the formats for for OpenMath Objects, Content Dictionaries, Content Dictionary Groups, and Signature files. OpenMath may also be encoded using Content MathML syntax.
The OpenMath Standard page links to specifications for each of these formats in the main XML grammar languages, DTD, Relax NG and XSD Schema.
The RelaxNG version is normative, and most expressive of these schemas.
Tools to use the RelaxNG schema include
In addition to the grammar validators, this site offers an experimental alternative:
Using the Web interface allows more specific error reporting than possible with a generic validator and can, in principle, check details not specified in grammars such as checking the existence of CD, or checking that symbol names are not duplicated in CD files.
All error messages are shown in red, inlined into an HTML presentation of the supplied XML file.
The colouring is always specified via the CSS class
err so other presentations may be used.
Also the error message is never marked just by colour, the error message text is always added in parenthesis after the
invalid expression such as
(Unexpected attribute ...)
Most reasonably current browsers should support the validation tool, it has been tested in Firefox, Chrome, Internet Explorer and Edge. Note that the XML is not uploaded to the server, all the validation is implemented within the browser, so some details are browser-specific, notably the error messages for files that are not well formed depend on the XML parser being used by the browser.
The validator should support files using prefixed or unprefixed namespaces, so
should both be accepted.
The current implementation is very close to the RelaxNG grammar, however some non-grammatical constraint checks have been added, such as checking uniqueness of defined names. Other checks may be added in future, such as checking the existence of CD files referenced by symbols, etc. Also other more stylistic warnings could be added, such as checking that a CD has a comment specifying a licence.
Issues may be reported using the github issue tracker or by email to the OpenMath mail list.