Schema validation ingnores modifications in XSD file

Having trouble installing Oxygen? Got a bug to report? Post it all here.
mic
Posts: 3
Joined: Mon May 03, 2021 11:02 am

Schema validation ingnores modifications in XSD file

Post by mic »

Hello,

I am working on a customized version of BITS-2.0 Schema. Therefore I download official XSD-Files from NCBI (ftp://ftp.ncbi.nih.gov/pub/jats/extensi ... .0-XSD.zip).

First I validate my XML-files with the local copy of official BITS-2.0 (Document=>Validate=>Validate with=>Browse for local file). Validation works as expected.

However, as soon as I make changes to one of the child XSD files, Oxygen (v21.0) doesn't recognize that the file has been changed. I assume that Oxygen caches files that are included by parent XSD.

Reason for my assumption: As soon as I rename the child XSD file (the one I modified) and adjust include/@schemaLocation in the parent XSD file accordingly, Oxygen recognizes my modifications.

I have done some research, but all attempts (clear cache, unset schema assignments, et cetera) have failed.

Thanks
mic
Posts: 3
Joined: Mon May 03, 2021 11:02 am

Re: Schema validation ingnores modifications in XSD file

Post by mic »

For clarification:
My attempts did not actually include clearing caches but disabling Schema caching options in Oxygen configuration menu (e.g. in Preferences => Document Type Association).

Mic
Radu
Posts: 9053
Joined: Fri Jul 09, 2004 5:18 pm

Re: Schema validation ingnores modifications in XSD file

Post by Radu »

Hi,

When performing automatic validation (validate as you type) Oxygen has a schemas cache that it uses to avoid re-parsing the associated schemas.
There is a "Validate" button located on the Oxygen toolbar which when pressed should perform manual validation. Manual validation should also reset any schema cache Oxygen has.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
mic
Posts: 3
Joined: Mon May 03, 2021 11:02 am

Re: Schema validation ingnores modifications in XSD file

Post by mic »

Hi Radu,

thanks for your reply.

For validation I always go through menu Document=>Validate=>Validate with=>Browse for local file.
Shouldn't this reset any cache likewise?

( I am not actively using "Validate as you type". )

Regards
Mic
Radu
Posts: 9053
Joined: Fri Jul 09, 2004 5:18 pm

Re: Schema validation ingnores modifications in XSD file

Post by Radu »

Hi,

There should be no schema caching involved when using the "Validate with" action.
One problem might be that Oxygen uses its XML catalog support to resolve references to various schema resources. So it may be possible that some XML Schemas from Oxygen's bundled JATS framework are still used for validation instead of your own custom schemas.
In the Oxygen Preferences->"Document Type Association" page there is a "JATSKit" framework configuration, maybe you can disable it, then try again to validate the XML document.
As an alternative in the Oxygen Preferences->"XML / XML Catalog" page there is a checkbox named "Resolve schema locations also through system mappings", maybe unchecking that will help as well.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply