Mr. Grun,

It is probably better to fix the actual source code:
_VALIDATE_XSD_INIT(ValidateXsdInit::new, "init()",

As follows:
_VALIDATE_XSD_INIT(ValidateXsdInit::new, "xsd-init()",

Regards,
Yitzhak Khabinsky

-----Original Message-----
From: ykhab...@bellsouth.net <ykhab...@bellsouth.net> 
Sent: Wednesday, January 10, 2024 10:16 AM
To: 'Christian Grün' <christian.gr...@gmail.com>
Cc: 'BaseX' <basex-talk@mailman.uni-konstanz.de>
Subject: RE: [basex-talk] How to invalidate XSD cache without stopping and 
restarting Jetty Web server?

Hi Mr. Grun,

Thanks for such super quick turnaround!

It seems that the first link [1] https://github.com/BaseXdb/basex/issues/2267
shows incorrect function signature as validate:xsd-init().
Shouldn't it  be validate:init()?

Regards,
Yitzhak Khabinsky

From: Christian Grün <christian.gr...@gmail.com>
Sent: Wednesday, January 10, 2024 6:19 AM
To: ykhab...@bellsouth.net
Cc: BaseX <basex-talk@mailman.uni-konstanz.de>
Subject: Re: [basex-talk] How to invalidate XSD cache without stopping and 
restarting Jetty Web server?

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

[1] https://github.com/BaseXdb/basex/issues/2267
[2] https://files.basex.org/releases/latest/


On Tue, Jan 9, 2024 at 11:00 PM <mailto:ykhab...@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



Reply via email to