Rust implementation of the RELAX NG XML schema language.
start =
element data { children }
children =
element dog { text } |
element sheep { text }
<data>
<cats>henry</cats>
</data>$ rng validate schema.rnc input.xml
Validating "input.xml"
error: element-start not expected here
--> input.xml:2:4
|
2 | <cats>henry</cats>
| ^^^^ Not allowed
help: Expected Element sheep dog
The relaxng-validator crate passes all 384 tests from the RELAX NG test suite.
All 44 XML Schema built-in datatypes are supported (except NOTATION, which the RelaxNG spec forbids).
relaxng-syntaxsupports parsing both the 'compact' (non-XML) syntax and the XML syntax into an 'abstract sytax tree' representation of an individual schema file.relaxng-modelprovides an intermediate representation of an RELAX NG schema, which might be composed of multiple related schema component files.relaxng-validatorable to perform validation of instance documents. Uses xmlparser.relaxng-tool- a demo CLI program to validate XML documents against a RELAX NG schema.relaxng-exemplifier- generate random example XML documents from a schema, for testing