BaseX version, installation recommendations

Wednesday, 23 July 2025 · 4 messages
RC
Rory Campbell-Lange23 Jul 2025 18:06 #
Dear List I may be working soon on a commercial server supporting XQuery 3.1+ with its own proprietary extensions, and XSLT 2.0. Would basex 12 be the best match for these protocol versions (except of the proprietary components, of course)? I'm most interesting in working in an iterative fashion on the command line, as I'm used to doing with vim and psql (the postgresql interactive terminal). If basex 12 is recommended, any pointers to getting this running on Debian would be gratefully received. Unfortunately Debian testing (https://packages.debian.org/sid/basex) still points to basex 10.5. I'm not familiar with Java installation requirements. Thank you for the project, which looks excellent. Many thanks, Rory
GS
Graydon Saunders23 Jul 2025 18:43 #
The zip package from (currently) https://files.basex.org/releases/12.0/BaseX120.zip unpacks and you're basically done. (With the caveat of needing an appropriate Java installed.) Mine lives in $HOME/bin/basex, so the actual executables are $HOME/bing/basex/basex/bin because there's a variety of versions: 12:32 basex % ls basex/ BaseX116.zip basex-118/ basex-119last/ custom/ BaseX114.zip basex-117/ BaseX118.zip BaseX119.zip data/ basex-116/ BaseX117.zip basex-119/ BaseX120.zip old/ The only thing that changes is that in the current basex/ the data/ directory (where all the db content lives) becomes a sym link up to $HOME/bin/basex/data so the active databases carry over at upgrade time. I would not expect this to be any more challenging on Debian than it is on Fedora. And yes, it'd be nice if it was a package, but on the other hand the data isn't global and the data lives with the rest of BaseX so I find this works well. -- Graydon
Quoted text · Rory Campbell-Lange · 14 lines
On Wed, Jul 23, 2025, at 12:06, Rory Campbell-Lange wrote: > Dear List > > I may be working soon on a commercial server supporting XQuery 3.1+ with its own proprietary extensions, and XSLT 2.0. > > Would basex 12 be the best match for these protocol versions (except of the proprietary components, of course)? I'm most interesting in working in an iterative fashion on the command line, as I'm used to doing with vim and psql (the postgresql interactive terminal). > > If basex 12 is recommended, any pointers to getting this running on Debian would be gratefully received. Unfortunately Debian testing (https://packages.debian.org/sid/basex) still points to basex 10.5. I'm not familiar with Java installation requirements. > > Thank you for the project, which looks excellent. > > Many thanks, > Rory >
MH
Martin Honnen23 Jul 2025 19:02 #
Quoted text · Graydon Saunders · 21 lines
On 23/07/2025 18:42, Graydon Saunders wrote: > The zip package from (currently) > https://files.basex.org/releases/12.0/BaseX120.zip > unpacks and you're basically done. (With the caveat of needing an > appropriate Java installed.) > > Mine lives in $HOME/bin/basex, so the actual executables are > $HOME/bing/basex/basex/bin because there's a variety of versions: > > > On Wed, Jul 23, 2025, at 12:06, Rory Campbell-Lange wrote: >> Dear List >> >> I may be working soon on a commercial server supporting XQuery 3.1+ >> with its own proprietary extensions, and XSLT 2.0. >> >> Would basex 12 be the best match for these protocol versions (except >> of the proprietary components, of course)? I'm most interesting in >> working in an iterative fashion on the command line, as I'm used to >> doing with vim and psql (the postgresql interactive terminal). >>
If you want XSLT 2.0 with BaseX, you additionally need to add Saxon HE, only that the currently supported versions 12 and 11 of Saxon are really XSLT 3.0 processors, not XSLT 2.0. Any XSLT 2 code would run well with those versions, however, as far as I can tell. But Saxon 12 or 11 are technically XSLT 3 processors, meaning you can run XSLT 3.0 code with them without problems and without any checking against the XSLT 2.0 spec, meaning if your target system only supports XSLT 2.0 you would not notice if you have written XSLT 3.0 only code before executing it on the target, XSLT 2.0 system. The older versions of Saxon, that only support XSLT 2.0 (I would need to check whether it was 9.6 or 9.7 as the latest) are of course still around, even if no longer officially supported.
MH
Martin Honnen23 Jul 2025 23:54 #
Quoted text · Martin Honnen · 44 lines
On 23/07/2025 22:49, Rory Campbell-Lange wrote: > On 23/07/25, Martin Honnen via BaseX-Talk (basex-talk at mailman.uni-konstanz.de) wrote: >> On 23/07/2025 18:42, Graydon Saunders wrote: >>> The zip package from (currently) >>> https://files.basex.org/releases/12.0/BaseX120.zip >>> unpacks and you're basically done. > ... > >>> On Wed, Jul 23, 2025, at 12:06, Rory Campbell-Lange wrote: >>>> I may be working soon on a commercial server supporting XQuery 3.1+ >>>> with its own proprietary extensions, and XSLT 2.0. >>>> >>>> Would basex 12 be the best match for these protocol versions (except >>>> of the proprietary components, of course)? I'm most interesting in >>>> working in an iterative fashion on the command line, as I'm used to >>>> doing with vim and psql (the postgresql interactive terminal). >> If you want XSLT 2.0 with BaseX, you additionally need to add Saxon HE >> that the currently supported versions 12 and 11 of Saxon are really XSLT 3.0 >> processors, not XSLT 2.0. > Thank you for the clarification about XSLT 3.0, Martin and Graydon. > > I've installed the latest basex (BaseX 12.1) and put Saxon-HE.jar in the lib folder. > > The example from page 116 of "XSLT, 2nd Edition" by Doug Tidwell which has an XSLT 2.0 example with the use of `separator` for <xsl:value-of>. > > Running > > saxon -s:cars.xml -xsl:cars.xsl -o:/tmp/o.xml > > works fine (where "saxon" means `java -jar /usr/share/java/Saxon-HE.jar $@`). > > Whereas: > > basex -o /tmp/o.xml "xslt:transform('cars.xml', 'cars.xsl')" > > Fails with: > > Stopped at <path>/basex/, 1/15: > [FODC0002] "" (Line 1): Content is not allowed in prolog. > > I assume I need to do something to fix the install path of the Saxon-HE.jar file. > > At the risk of trying everyone's patience further, further advice would be helpful. >
I am afraid, somewhere along the postings, I messed the location up, I have looked at my BaseX 12 installation and it has a "lib" folder which has a "custom" sub folder in which I have the Saxon HE jar saxon-he-12.8.jar. That "custom" subfolder has another "lib" sub folder in which I have the libraries Saxon depends on, namely xmlresolver-5.3.3.jar, xmlresolver-5.3.3-data.jar and jline-2.14.6.jar (this lib folder with the xml resolver and jline jars is part of the Saxon HE 12 download you find on Github e.g. https://github.com/Saxonica/Saxon-HE/releases/download/SaxonHE-12-8/SaxonHE12-8J.zip). A minimal command line I am able to run (it is Windows Powershell) is e.g. C:\Users\marti\.jdks\temurin-17.0.15\bin\java.exe -cp '.\BaseX.jar;.\lib\custom\saxon-he-12.8.jar' org.basex.BaseX "xslt:transform('sample1.xml', 'sheet1.xsl')" I hope that gets you up and running.

⚡Generated with XQuery