Report language
To support the MUST, SHOULD, MAY style of rules we use in the validator we have developed a small report language to indicate the different levels of severity. The structure of this language is shown schematically below.
Example documents
VALID
<report xmlns = "http://www.xml-cml.org/report/"> <well-formed-test> <valid >xml is well formed</valid> </well-formed-test> <schema-validation-test> <valid>document conforms to the schema</valid> </schema-validation-test> <convention-validation-test> <valid>document conforms to all the conventions specified</valid> </convention-validation-test> <uris-reachable-test> <valid>All appropriate URIs were reachable</valid> <valid>all dictRefs are resolvable </valid> </uris-reachable-test> </report>
VALID with INFO
<report xmlns = "http://www.xml-cml.org/report/"> <well-formed-test> <valid > xml is well formed </valid> </well-formed-test> <schema-validation-test> <valid > document conforms to the schema </valid> </schema-validation-test> <convention-validation-test> <info location = "/*[local-name() = 'unitList' and namespace-uri() = 'http://www.xml-cml.org/schema'] [1]/*[local-name() = 'molecule' and namespace-uri() = 'http://www.xml-cml.org/schema'] [1]"> molecule is not a part of the http://www.xml-cml.org/convention/simpleUnit convention and may be ignored by some processors. </info> <valid> document conforms to all the conventions specified </valid> </convention-validation-test> <uris-reachable-test> <valid > All appropriate URIs were reachable </valid> <valid > all dictRefs are resolvable </valid> </uris-reachable-test> </report>
INVALID
<report xmlns = "http://www.xml-cml.org/report/"> <well-formed-test> <valid > xml is well formed </valid> </well-formed-test> <schema-validation-test> <valid > document conforms to the schema </valid> </schema-validation-test> <convention-validation-test> <error location = "/*[local-name() = 'molecule' and namespace-uri() = 'http://www.xml-cml.org/schema'] [1]@*[local-name() = 'convention' and namespace-uri() = '']"> the only valid cml element that can specify the simpleUnit convention is "unitList" </error> </convention-validation-test> <uris-reachable-test> <valid > All appropriate URIs were reachable </valid> <valid > all dictRefs are resolvable </valid> </uris-reachable-test> </report>