Page 1 of 1

Validate against specified xsd with embedded schematorn rules

Posted: Mon Feb 26, 2018 5:49 pm
by Patrik
Hi,

I have multiple XSD with embedded schematron rules. When validating an xXML file referencing one of the XSDs the embedded schematron rules are not checked. I knkow I can create a validation scenario but I have to set a specific XSD to enable the "Embedded Schematron rules" check box. But then I have to create a validation scenario for every XSDand select the right one for each XML file. Is there a way to either enable embedded schematron checks for every XSD or define a validation scenario against the references XSD with embedded schematron rules?

Currently still using oXygen 18.1.

Thanks and regards,
Patrik

Re: Validate against specified xsd with embedded schematorn rules

Posted: Mon Feb 26, 2018 6:40 pm
by adrian
Hello,
Patrik wrote:Is there a way to either enable embedded schematron checks for every XSD or define a validation scenario against the references XSD with embedded schematron rules?
Unfortunately there is no global option to force embedded Schematron for all XSDs. Also, a validation unit from a validation scenario can only be configured to use the detected schema or a specific schema. For the detected schema you cannot specify the schema type.

You should specify in the XML instance that the XSD should also be treated as Schematron

Code: Select all

<?xml-model href="myschema.xsd" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
Regards,
Adrian

Re: Validate against specified xsd with embedded schematorn rules

Posted: Tue Feb 27, 2018 8:34 am
by Patrik
Thanks Adrian, this solution works fine with me.
Regards,
Patrik