Page 1 of 1

Schema validation ingnores modifications in XSD file

Posted: Mon May 03, 2021 12:38 pm
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

Re: Schema validation ingnores modifications in XSD file

Posted: Mon May 03, 2021 10:33 pm
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

Re: Schema validation ingnores modifications in XSD file

Posted: Tue May 04, 2021 7:03 am
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

Re: Schema validation ingnores modifications in XSD file

Posted: Tue May 04, 2021 8:37 am
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

Re: Schema validation ingnores modifications in XSD file

Posted: Tue May 04, 2021 10:45 am
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