Is it possible to use xml schema to express somme rules for other schemas ?
I’ve read XML Schema to validate XML Schemas? and it’s very interesting, but I should want to verify some applicative rules ; for instance, in a schema is there a version number to the xs:schema element ? Is there a use attribute to the xs:attribute element ? Etc.
Is there some good practices for that ?
Thanks.
This is an almost perfect application for Schematron. I can’t give you a full schematron for testing that sort of rule but you would be looking at something like:
Schematron allows you express rules driven for any xml file (obviously, including schemas) that go beyond simple grammar rules. You can use them to extend validation into the level of business rules.