Framework - not the same validation

Post here questions and problems related to oXygen frameworks/document types.
Johann
Posts: 198
Joined: Wed Jun 17, 2015 12:46 pm

Framework - not the same validation

Post by Johann »

Hi,

I've created a .framework file containing in the field schemaDescriptor the path to an .xsd file.

When I open in Oxygen 17 a document (without associating the previous framework) and I associate the same .xsd file, there is no error when I validate the document (I get a green square).

But, when I associate the previous framework and when I open the same file (which of course match this framework), I get valdiation errors.

How can the validation errors list be different ? Are there options to change the way the xsd is loaded or the way the validation is done ?

Thanks for your help,

Johann
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Framework - not the same validation

Post by Radu »

Dear Johann,

Please see some answers below:
I've created a .framework file containing in the field schemaDescriptor the path to an .xsd file.
That schema you associate in the framework is only used when the XML does not implicitly refer to some other schema.
When I open in Oxygen 17 a document (without associating the previous framework) and I associate the same .xsd file, there is no error when I validate the document (I get a green square).
How exactly do you associate the XML Schema? By setting the xsi:schemaLocation attribute on the root element?
But, when I associate the previous framework and when I open the same file (which of course match this framework), I get validation errors.
So in this case does the opened XML file refer directly to the XML schema using the xsi:schemaLocation attribute? If so, the schema you specified in the framework configuration should be ignored.
How can the validation errors list be different ? Are there options to change the way the xsd is loaded or the way the validation is done
Do you use XML Schema version 1.0 or the experimental 1.1?
Unfortunately I do not have enough details about what the reported errors are. Do the reported errors make sense?
Do you use an XML catalog which might possibly re-direct the reference to the schema to another XML Schema with slightly different content?
If you open the XML Document, you can use the toolbar "Open Associated Schema" action to see from where the schema used for validation is loaded.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Johann
Posts: 198
Joined: Wed Jun 17, 2015 12:46 pm

Re: Framework - not the same validation

Post by Johann »

Hi Radu,

Thanks a lot for your responses. They enabled me to succeed in finding what was wrong.

I did not get the same validation errors list between an XML file using xsi:schemaLocation and the same XML file using a framework. The difference and the error was located in the XML catalog I use in the framework. This catalog uses uriSuffix elements which incorrectly redirected included XSD schema...

Thanks again,

Johann
Post Reply