BaseX version
Hello,
thanks a lot for the new version.
Is there a way to extract the version of BaseX from within xquery? It could be usable for alternating code paths without having to branch the code.
Regards,
Marco.
Quoted text · Marco Lettere · 2 lines
On 03/11/2026 16:49, Marco Lettere via BaseX-Talk wrote: > Is there a way to extract the version of BaseX from within xquery?
db:system()/generalinformation/versionHi Marco,
Depending on your circumstances, an alternative to
db:system()/generalinformation/version can be to test for the presence of the
functions you want to use. See [1] for an example.
/Andy
Quoted text · Marco Lettere · 14 lines
On Tue, 3 Nov 2026 at 15:49, Marco Lettere via BaseX-Talk < basex-talk at mailman.uni-konstanz.de> wrote: > Hello, > > thanks a lot for the new version. > > Is there a way to extract the version of BaseX from within xquery? It > could be usable for alternating code paths without having to branch the > code. > > Regards, > > Marco. >
In this case I need to know whether an option (trusted) is supported or not in xquery-load-module.
So, even if your solution is comfortable Andy, I think it will not apply for this scenario.
I'll use try{}catch{} because I'm too lazy to implement a complete, general-purpose version matching routine.
Thanks to both of you,
Marco.
Quoted text · Andy Bunce · 29 lines
On 11/3/26 18:20, Andy Bunce wrote: > > Hi Marco, > > Depending on your circumstances, an alternative to > `db:system()/generalinformation/version` can be to test for the > presence of the > functions you want to use. See [1] for an example. > > /Andy > > [1] > https://github.com/expkg-zone58/pdfbox/blob/3cafc6af046d2eac153b2bdf117fdcea84ff68ea/src/Pdfbox3.xqm#L522 > > On Tue, 3 Nov 2026 at 15:49, Marco Lettere via BaseX-Talk > <basex-talk at mailman.uni-konstanz.de> wrote: > > Hello, > > thanks a lot for the new version. > > Is there a way to extract the version of BaseX from within xquery? > It could be usable for alternating code paths without having to > branch the code. > > Regards, > > Marco. >
Written for BaseX 12.4. BaseX may have changed since: please check the current documentation.