Hi Christian, I have tested below code but it is not working.
System.setProperty("org.basex.DEFAULTDB", "true"); XQDataSource xqs = new BaseXXQDataSource();
and xquery is: String xQuery = "for $article in doc('6301904f80000114/0601904f80007547.xml') return $article"; it is not working. Thanks, Srikumar ________________________________ From: Christian Grün christian.gruen@gmail.com Sent: Tuesday, August 18, 2020 10:09 PM To: Srikumar Choudhury schoudhu@opentext.com Cc: basex-talk@mailman.uni-konstanz.de basex-talk@mailman.uni-konstanz.de; Nikhil Sethi nsethi@opentext.com Subject: Re: [EXTERNAL] - Re: Error: Stopped at ., 1/20: [FODC0002] Resource 'C:/Srikumar/Software/BaseX/BaseX941/basex/bin/6301904f80000114/0601904f80007547.xml' does not exist.
I have tried with below code, but it did not work. Is it correct to way to set this option?? Is there any other way to set DEFAULTDB?
XQDataSource xqs = new BaseXXQDataSource(); ... System.setProperty("DEFAULTDB", "true");
The property key needs to be prefixed with 'org.basex.', and I would recommend you to set this property as early as possible (i.e., before the BaseXXQDataSource instance is created). See [1] for more information on how to set options with BaseX.
I remember there also was a way to set options via XQJ, but I can’t tell you off-hand how the corresponding method was called.
[1] https://urldefense.com/v3/__https://docs.basex.org/wiki/Options__;!!Obbck6kT...