Validate against specified xsd with embedded schematorn rules

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Patrik
Posts: 244
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Validate against specified xsd with embedded schematorn rules

Post by Patrik » Mon Feb 26, 2018 5:49 pm

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

adrian
Posts: 2668
Joined: Tue May 17, 2005 4:01 pm

Re: Validate against specified xsd with embedded schematorn rules

Post by adrian » Mon Feb 26, 2018 6:40 pm

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Patrik
Posts: 244
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: Validate against specified xsd with embedded schematorn rules

Post by Patrik » Tue Feb 27, 2018 8:34 am

Thanks Adrian, this solution works fine with me.
Regards,
Patrik

Post Reply