How to change processor to Saxon
Tuesday, 27 May 2014 · 4 messages · last reply 28 May 2014
E
emchateau27 May 2014 16:02 #
Using based to publish TEI-XML files, allows to take benefits from the Java's environment using XSLT 2.0. But we didn't cope with putting Saxon in the Classpath for BaseX.
Is there any simple steps doing it ?
On a mac, we were able to do it by putting the Saxon's jar files into
/Library/Java/Extensions/ Running basexhttp, the expression xslt:processor() returns "Saxon" and xslt:version() returns "2.0".
On an ubuntu machine, there is no such directory for Java. We've first tried to set the CLASSPATH with export CLASSPATH=/usr/share/java/saxon9he.jar (and various other things) unhopely without success.
Your help would be very welcome !
Emmanuel Chateau and Philippe PonsAG
Arve Gengelbach27 May 2014 16:14 #
If you are using the zip distribution you can e.g. manually edit the start scripts located in etc folder. These files are as [BaseX Startscript]. Adjusting the $CP variable should do it.
Hope this helps,
Arve
[BaseX Startscript] https://github.com/BaseXdb/basex/blob/master/basex-core/etc/basex
Quoted text · emchateau at laposte.net · 15 lines
On 27 May 2014, at 16:02, emchateau at laposte.net wrote: > Using based to publish TEI-XML files, allows to take benefits from the Java's environment using XSLT 2.0. > But we didn't cope with putting Saxon in the Classpath for BaseX. > > Is there any simple steps doing it ? > > On a mac, we were able to do it by putting the Saxon's jar files into `/Library/Java/Extensions/` > Running basexhttp, the expression `xslt:processor()` returns "Saxon" and `xslt:version()` returns "2.0". > > On an ubuntu machine, there is no such directory for Java. We've first tried to set the CLASSPATH with `export > CLASSPATH=/usr/share/java/saxon9he.jar` (and various other things) unhopely without success. > > Your help would be very welcome ! > > Emmanuel Chateau and Philippe Pons
EC
Emmanuel Chateau28 May 2014 11:25 #
Thanks a lot, it works fine.
For a non Java user, it's not so obvious why we start BaseX with a script. Now i can figure out why. It may be nice to put a comment line in these scripts and give a clue about it in the documentation.
I just changed the line :
# API, core, and library classes
CP="$BX/BaseX.jar$(printf ":%s" "$BX/BaseX.jar" "$BX/lib/"*.jar "$BXCORE/target/classes" "$BXCORE/lib/"*.jar)"to
# API, core, and library classes
CP="$BX/BaseX.jar$(printf ":%s" "$BX/BaseX.jar" "$BX/lib/"*.jar "$BXCORE/target/classes" "$BXCORE/lib/"*.jar "/mypathTo/Saxon/saxon9he.jar")"and it works fine.
Emmanuel Chateau
50, rue Charlot, 75003 Paris (France)
+33 (0)6 38 11 42 59
emchateau at laposte.net
skype : emchateau
twitter : @emchateau
Quoted text · Arve Gengelbach · 27 lines
Le 27 mai 2014 à 16:14, Arve Gengelbach a écrit : > If you are using the zip distribution you can e.g. manually edit the start scripts located in etc folder. > These files are as [BaseX Startscript]. Adjusting the $CP variable should do it. > > Hope this helps, > Arve > > [BaseX Startscript] https://github.com/BaseXdb/basex/blob/master/basex-core/etc/basex > > > On 27 May 2014, at 16:02, emchateau at laposte.net wrote: > >> Using based to publish TEI-XML files, allows to take benefits from the Java's environment using XSLT 2.0. >> But we didn't cope with putting Saxon in the Classpath for BaseX. >> >> Is there any simple steps doing it ? >> >> On a mac, we were able to do it by putting the Saxon's jar files into `/Library/Java/Extensions/` >> Running basexhttp, the expression `xslt:processor()` returns "Saxon" and `xslt:version()` returns "2.0". >> >> On an ubuntu machine, there is no such directory for Java. We've first tried to set the CLASSPATH with `export >> CLASSPATH=/usr/share/java/saxon9he.jar` (and various other things) unhopely without success. >> >> Your help would be very welcome ! >> >> Emmanuel Chateau and Philippe Pons >
CG
Christian Grün28 May 2014 14:07 #
Hi Emmanuel,
Quoted text · Emmanuel Chateau · 2 lines
> It may be nice to put a comment line in these scripts and give a clue about > it in the documentation.
Thanks for your feedback! Sounds like a helpful hint. Please don't hesitate to tell us if you have some concrete idea what to add in the scripts/the documentation.
Best,
Christian
Written for BaseX 7.8. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery