Page 1 of 1

Schematron validation of an XSD file

Posted: Fri Jul 27, 2018 5:27 am
by bobstuart
I'm trying to use Schematron rules to help enforce naming design patterns in my teams XSD files.
I put the reference to the Schematron as a PI in the xsd but oxygen appears to ignore it.
if I change the suffix of the file to XML it still ignores it BUT if I wrap the xsd in a dummy node so the root is no longer xmlschema namespace then the schematron fires as expected.

Is there some preference I'm not setting or is this a feature/bug?

Re: Schematron validation of an XSD file

Posted: Fri Jul 27, 2018 12:18 pm
by tavy
Hello,

For XSD documents you can impose Schematron rules only through a validation scenario. We do not have support to associate a Schematron directly in the XSD file.
More information about how to associate a schema through a validation scenario you can find in our user manual:
https://www.oxygenxml.com/doc/versions/ ... nario.html

You can also change the "XML Schema" document type and add a new validation scenario there, in case you want to apply the Schematron rules to all XSD files. You can find more information here:
https://www.oxygenxml.com/doc/versions/ ... ation.html
https://www.oxygenxml.com/doc/versions/ ... ework.html

Best Regards,
Octavian