CMLComp is described by a RelaxNG schema, the latest version of which can always be found in the git repository (http://uszla.me.uk/git/CMLComp.git)

You can check conformance of any files you produce against this schema in two ways:

Web validation

There is an online CMLComp validator.

Command-line validation

In order to check conformance, you need a schema validator. There are (amongst many others) two obvious choices:

  • xmllint, which is installed by default on every recent Linux and Mac OS X, system.
  • jing which must be separately installed (there is a fink package for Mac OS X users), but gives much better diagnostics in case of failure to validate.

In order to use the command-line validators, you also need to either be working with access to the web, or have already downloaded the CMLComp schema documents. Retrieve CMLComp-micro.rng or CMLComp-doc.rng according to preference. (Or download the tarball of the whole tree).

While the schema is still under development, the URLs used here will retrieve the latest version. A stable URL will be publicized once a release of the CMLComp schema is made.

To validate a document document.cml against just the CMLComp microstructure standard:

xmllint --relaxng http://uszla.me.uk/gitweb/CMLComp.git/master:/CMLComp.rng document.cml

or

jing http://uszla.me.uk/gitweb/CMLComp.git/master:/CMLMicro.rng document.cml

and similarly with CMLComp-doc.rng if you want full microformat+document-structure validation.

Common Errors

If your CML does not validate, there is a listing of CommonErrors.