XSLT Module: feature request - XSLT 3.0 support
Monday, 9 April 2018 · 6 messages · last reply 11 Apr 2018
YK
Yitzhak Khabinsky9 Apr 2018 19:14 #
Hello,
We have Saxon EE edition v.9.8.* licenses and are using XSLT stylesheets compliant with the XSLT 3.0 standard. Unfortunately, BaseX XSLT module currently supports up to XSLT 2.0 standard only.
return
xslt:processor(), xslt:version() yields the following: Saxon EE
2.0
Though Saxon XSLT processor supports XSLT 3.0 standard.
XSLT 3.0 features are available in all Saxon editions.
http://saxonica.com/documentation/index.html#!using-xsl/xslt30
And Michael Kay chairs the w3c XSLT group.
Are there any plans to add the XSLT 3.0 standard support to the BaseX XSLT module?
[cid:image001.png at 01D3D004.BB4AE290]
Regards,
Yitzhak Khabinsky
Technical Services Lead
Millicom International Services LLC
396 Alhambra Circle, Suite 1100
Coral Gables, FL 33134
Skype4B: +1 (305) 445-4172
Tel: (954) 684-8673
yitzhak.khabinsky at millicom.com<mailto:.khabinsky at millicom.com> www.millicom.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.millicom.com%2F&data=02%7C01%7CMalcolm.Stewart%40microsoft.com%7C9338023699c2494d08be08d4ad12ce55%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636323743686702678&sdata=DxQ9dfL259rpdVZ9seOAcR6bvgxRobyIerOgvTgPc90%3D&reserved=0>MH
Martin Honnen9 Apr 2018 20:45 #
Quoted text · Yitzhak Khabinsky · 16 lines
On 09.04.2018 19:14, Yitzhak Khabinsky wrote: > We have Saxon EE edition v.9.8.* licenses and are using XSLT stylesheets > compliant with the XSLT 3.0 standard. > > Unfortunately, BaseX XSLT module currently supports up to XSLT 2.0 > standard only. > > return xslt:processor(), xslt:version() yields the following: > > *Saxon EE* > > *2.0* > > Though Saxon XSLT processor supports XSLT 3.0 standard. > > XSLT 3.0 features are available in all Saxon editions.
For what it's worth, I have started BaseX with Saxon 9.8 EE on the class path and have run (using the
xslt:transform-text function) an XSLT 3.0 stylesheet inspecting the various XSLT system-property() results and the results clearly indicate that Saxon runs as an XSLT 3.0 processor with all new XSLT 3.0 features it implements (like
xsl:supports-dynamic-evaluation, xsl:supports-higher-order-functions, xsl:xpath-version as 3.1) so I don't know what the BaseX xslt:version() function does but I think it doesn't prevent you from running XSLT 3 with BaseX.YK
Yitzhak Khabinsky9 Apr 2018 22:27 #
Hello,
Good news on my end.
I was running the following 3 lines in the BaseX Editor:
let $doc := 'd:\Temp\CDW\IFRS\InforSunSystems\id0001_TZ20180200_IFRS15_SunSystems_3TZ002.xml'
let $stylesheet := 'd:\Temp\CDW\IFRS\InforSunSystems\IFRS15_SunSystemsOut.xslt'
return xslt:transform($doc, $stylesheet)And getting the following error message:
"" (Line 1): Content is not allowed in prolog.
My XSLT stylesheet starts as follows:
<?xml version="1.0"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xpath-default-namespace="http://www.millicom.com" xmlns:functx="http://www.functx.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:strip-space elements="*"/>Based on Martin's input, I changed the last line to:
return
xslt:transform-text($doc, $stylesheet)
And everything is working.
Thanks a lot!
Regards,
Yitzhak Khabinsky
Technical Services Lead
Millicom International Services LLC
396 Alhambra Circle, Suite 1100
Coral Gables, FL 33134
Skype4B: +1 (305) 445-4172
Tel: (954) 684-8673
yitzhak.khabinsky at millicom.com<mailto:.khabinsky at millicom.com> www.millicom.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.millicom.com%2F&data=02%7C01%7CMalcolm.Stewart%40microsoft.com%7C9338023699c2494d08be08d4ad12ce55%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636323743686702678&sdata=DxQ9dfL259rpdVZ9seOAcR6bvgxRobyIerOgvTgPc90%3D&reserved=0>YK
Yitzhak Khabinsky10 Apr 2018 17:46 #
Just some minor touches for the XSLT Module for improvement.
1. If Saxon is present in the classpath
set CP=%MAIN%\BaseX.jar;%MAIN%\lib\*;%MAIN%\lib\custom\*;d:\Kit\Saxonica\9.8.0.11\JavaEE\*
return
xslt:processor(), xslt:version()
shall return
Saxon EE
3.0
instead of
Saxon EE
2.0
1. Documentation improvement
http://docs.basex.org/wiki/Xslt_Module
It currently says "...XSLT 2.0 is used instead if Version 9.x of the Saxon XSLT Processor<http://www.saxonica.com/> (saxon9he.jar, saxon9pe.jar, saxon9ee.jar) is found in the classpath...."
Regards,
Yitzhak Khabinsky
Technical Services Lead
Millicom International Services LLC
396 Alhambra Circle, Suite 1100
Coral Gables, FL 33134
Skype4B: +1 (305) 445-4172
Tel: (954) 684-8673
yitzhak.khabinsky at millicom.com<mailto:.khabinsky at millicom.com> www.millicom.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.millicom.com%2F&data=02%7C01%7CMalcolm.Stewart%40microsoft.com%7C9338023699c2494d08be08d4ad12ce55%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636323743686702678&sdata=DxQ9dfL259rpdVZ9seOAcR6bvgxRobyIerOgvTgPc90%3D&reserved=0>CG
Christian Grün11 Apr 2018 08:46 #
Hi Yitzhak,
As Martin has already indicated, you have access to all XSLT 3.0 features with BaseX. And as you have suggested, I have just updated the returned constants. A new snapshot will be available soon.
Best,
Christian
Quoted text · Yitzhak Khabinsky · 58 lines
On Tue, Apr 10, 2018 at 5:46 PM, Yitzhak Khabinsky <Yitzhak.Khabinsky at millicom.com> wrote: > Just some minor touches for the XSLT Module for improvement. > > > > If Saxon is present in the classpath > > set > CP=%MAIN%\BaseX.jar;%MAIN%\lib\*;%MAIN%\lib\custom\*;d:\Kit\Saxonica\9.8.0.11\JavaEE\* > > > > return xslt:processor(), xslt:version() > > shall return > > Saxon EE > > 3.0 > > instead of > > Saxon EE > > 2.0 > > > > Documentation improvement > http://docs.basex.org/wiki/Xslt_Module > It currently says “…XSLT 2.0 is used instead if Version 9.x of the Saxon > XSLT Processor (saxon9he.jar, saxon9pe.jar, saxon9ee.jar) is found in the > classpath….” > > > > Regards, > > Yitzhak Khabinsky > > Technical Services Lead > > Millicom International Services LLC > > 396 Alhambra Circle, Suite 1100 > > Coral Gables, FL 33134 > > Skype4B: +1 (305) 445-4172 > > Tel: (954) 684-8673 > > yitzhak.khabinsky at millicom.com > > www.millicom.com > >
YK
Yitzhak Khabinsky11 Apr 2018 16:14 #
Hi Christian,
Thanks a lot for the quick turnaround. ☺
• I installed the latest BaseX901-20180411.084824.exe build. It resolved the return
xslt:processor(), xslt:version() call. It correctly returns now the following:
Saxon EE
3.0
• Please don't forget to update the wiki documentation. http://docs.basex.org/wiki/Xslt_Module
It still says "… XSLT 2.0 is used instead if Version 9.x of the Saxon XSLT Processor<http://www.saxonica.com/>…"
Regards,
Yitzhak Khabinsky
Technical Services Lead
Millicom International Services LLC
396 Alhambra Circle, Suite 1100
Coral Gables, FL 33134
Skype4B: +1 (305) 445-4172
Tel: (954) 684-8673
yitzhak.khabinsky at millicom.com
www.millicom.comQuoted text · Christian Grün · 68 lines
-----Original Message----- From: Christian Grün [mailto:christian.gruen at gmail.com] Sent: Wednesday, April 11, 2018 2:47 AM To: Yitzhak Khabinsky <Yitzhak.Khabinsky at Millicom.com> Cc: basex-talk at mailman.uni-konstanz.de Subject: Re: [basex-talk] XSLT Module: feature request - XSLT 3.0 support Hi Yitzhak, As Martin has already indicated, you have access to all XSLT 3.0 features with BaseX. And as you have suggested, I have just updated the returned constants. A new snapshot will be available soon. Best, Christian On Tue, Apr 10, 2018 at 5:46 PM, Yitzhak Khabinsky <Yitzhak.Khabinsky at millicom.com<mailto:Yitzhak.Khabinsky at millicom.com>> wrote: > Just some minor touches for the XSLT Module for improvement. > > > > If Saxon is present in the classpath > > set > CP=%MAIN%\BaseX.jar;%MAIN%\lib\*;%MAIN%\lib\custom\*;d:\Kit\Saxonica\9 > .8.0.11\JavaEE\* > > > > return xslt:processor(), xslt:version() > > shall return > > Saxon EE > > 3.0 > > instead of > > Saxon EE > > 2.0 > > > > Documentation improvement > http://docs.basex.org/wiki/Xslt_Module > It currently says “…XSLT 2.0 is used instead if Version 9.x of the > Saxon XSLT Processor (saxon9he.jar, saxon9pe.jar, saxon9ee.jar) is > found in the classpath….” > > > > Regards, > > Yitzhak Khabinsky > > Technical Services Lead > > Millicom International Services LLC > > 396 Alhambra Circle, Suite 1100 > > Coral Gables, FL 33134 > > Skype4B: +1 (305) 445-4172 > > Tel: (954) 684-8673 > > yitzhak.khabinsky at millicom.com<mailto:yitzhak.khabinsky at millicom.com> > > www.millicom.com<http://www.millicom.com> > >
Written for BaseX 9.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery