Schematron validation of an XSD file

This should cover W3C XML Schema, Relax NG and DTD related problems.
bobstuart
Posts: 8
Joined: Fri Jul 27, 2018 5:22 am

Schematron validation of an XSD file

Post 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?
tavy
Posts: 365
Joined: Thu Jul 01, 2004 12:29 pm

Re: Schematron validation of an XSD file

Post 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
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply