Hi Yitzhak,

Thanks for the suggestion. Feel free to check out the latest stable snapshot, it contains two new functions for discarding cached XSD schemas and XSL transformers [1,2].

Best,
Christian



On Tue, Jan 9, 2024 at 11:00 PM <ykhabins@bellsouth.net> wrote:
Hello,

We are using BaseX 10.8 beta for XML files validation against the XSD.
Our XSDs are conformant with the XSD 1.1 that why all necessary Apache
Xerces 12.2.2 files are in the lib/custom directory.
On top of that we are using Jetty Web server by launching c:\Program Files
(x86)\BaseX\bin\basexhttp.bat

Eventually, our REST HTTP call is as follow:
string REQUESTURL =
$"http://{HOST}:{PORT}/rest?run={XQUERY}&$xml={xmlFile}&$xsd={xsdFile}";

Our XQuery validation call is as follows:
let $result := validate:xsd-report($xml, $xsd, map {
'http://apache.org/xml/features/validation/cta-full-xpath-checking': true(),
'cache': true() })

Everything is working as expected. :)

Here is a question.
===================
The validate:xsd-report(...) call is using caching via the 'cache': true()
parameter.
We are updating XSDs from time to time.
Unfortunately, the validation is not picking up a new version of the XSD
file on the file system.
It is unaware that the *.xsd file was updated.
It is still using an old XSD version that is cached in memory.

Is it possible to invalidate the XSD cache without stopping and restarting
Jetty Web server?
IMHO, it is too intrusive.
Maybe you can introduce a manual command for XSD cache invalidation in the
BaseX GUI?
Or some other mechanism to handle the scenario.

Regards,
Yitzhak Khabinsky