Appendix A (informative) RELAX NG compact schema
Table of contents
Note: The following RELAX NG compact schema may be found online at maf.rnc
Schema maf: Attribute classes
att.maf.globals att.maf.header.standoff att.token.information att.token.join att.token.span att.wordForm.content att.wordForm.tokensSchema maf: Macros
macro.DocumentLocation macro.fsm.stateSchema maf: Elements
bicond binary cond dcs default f fDecl fDescr fLib fs fsConstraints fsDecl fsDescr fsdDecl fsdLink fsm fvLib if iff maf numeric string symbol tagset then token transition vAlt vColl vDefault vLabel vMerge vNot vRange wfAlt wordFormAppendix A.1 Validating MAF documentsISO: Validating MAF documents¶
For validating MAF document, the first step is to convert the RELAX NG compact schema into an XML RELAX NG schema (for instance using trang). Such a XML RELAX NG schema may be found at maf.rng
Then, the validation may be performed, for instance, using xmllint (from libxml2).
xmllint --relaxng maf.rng mafdoc.xml
It should be noted that some semantics constraints of MAF are not checked by the RELAX NG schema, in particular the constraint between the word form and token paths expressed in Section 9.3.2.