Hi!
Is there something in BaseX that prohibits using higher order functions in XSLT (called with xslt:transform)?
for-each($somenodes, function($q) { string($q) })
and
for-each($somenodes, string#1)
both work in XQuery in BaseX, but when I use the same call in an XSLT that I call with xslt:transform, I get the following message
XPST0003: Inline functions require support for higher-order-functions, which needs Saxon-PE or higher. I am using Saxon EE 9.9.1.2 (also tried PE 9.9.1.2)
The XSLT works fine if I run it with Saxon directly without using BaseX and the function xslt:transform. Is there something I can do to get this to work, or is this out of my control?
Regards
/nikos
Am 28.03.2019 um 11:48 schrieb nikos dimitrakas:
Hi!
Is there something in BaseX that prohibits using higher order functions in XSLT (called with xslt:transform)?
for-each($somenodes, function($q) { string($q) })
and
for-each($somenodes, string#1)
both work in XQuery in BaseX, but when I use the same call in an XSLT that I call with xslt:transform, I get the following message
XPST0003: Inline functions require support for higher-order-functions, which needs Saxon-PE or higher. I am using Saxon EE 9.9.1.2 (also tried PE 9.9.1.2)
The XSLT works fine if I run it with Saxon directly without using BaseX and the function xslt:transform. Is there something I can do to get this to work, or is this out of my control?
Do you get other Saxon EE or PE only features to work when using it from BaseX? It might be that your Saxon EE license is not found and in that case I think Saxon EE or PE fall back to only offer HE features.
So make sure the Saxon license file is on the class path.
On 2019-03-28 11:54, Martin Honnen wrote:
Am 28.03.2019 um 11:48 schrieb nikos dimitrakas:
Hi!
Is there something in BaseX that prohibits using higher order functions in XSLT (called with xslt:transform)?
for-each($somenodes, function($q) { string($q) })
and
for-each($somenodes, string#1)
both work in XQuery in BaseX, but when I use the same call in an XSLT that I call with xslt:transform, I get the following message
XPST0003: Inline functions require support for higher-order-functions, which needs Saxon-PE or higher. I am using Saxon EE 9.9.1.2 (also tried PE 9.9.1.2)
The XSLT works fine if I run it with Saxon directly without using BaseX and the function xslt:transform. Is there something I can do to get this to work, or is this out of my control?
Do you get other Saxon EE or PE only features to work when using it from BaseX? It might be that your Saxon EE license is not found and in that case I think Saxon EE or PE fall back to only offer HE features.
So make sure the Saxon license file is on the class path.
Yes, I get other XSLT 3 features to work, like for-each-group with composite="true" and xsl:evaluate
I also have checked that the right version is the one used by printing the available-system-properties() with their values and I get the following:
<SysProp name="xsl:version" val="3.0"/> <SysProp name="xsl:vendor" val="Saxonica"/> <SysProp name="xsl:vendor-url" val="http://www.saxonica.com/"/> <SysProp name="xsl:product-name" val="SAXON"/> <SysProp name="xsl:product-version" val="EE 9.9.1.2"/> <SysProp name="xsl:is-schema-aware" val="no"/> <SysProp name="xsl:supports-serialization" val="yes"/> <SysProp name="xsl:supports-backwards-compatibility" val="yes"/> <SysProp name="xsl:supports-namespace-axis" val="yes"/> <SysProp name="xsl:supports-streaming" val="no"/> <SysProp name="xsl:supports-dynamic-evaluation" val="no"/> <SysProp name="xsl:supports-higher-order-functions" val="no"/> <SysProp name="xsl:xpath-version" val="3.1"/> <SysProp name="xsl:xsd-version" val="1.1"/>
It says "no" for "xsl:supports-higher-order-functions" so maybe it is a license issue. Both the PE and EE editions are supposed to have support for higher order functions, but the functionality is apparently deactivated when the license is not found. I fixed the license and now it works. Thank you for the suggestion.
/nikos
On Thu, 2019-03-28 at 11:48 +0100, nikos dimitrakas wrote:
[...]
XPST0003: Inline functions require support for higher-order- functions, which needs Saxon-PE or higher. I am using Saxon EE 9.9.1.2 (also tried PE 9.9.1.2)
This suggests BaseX is picking up the wrong version of Saxon, or maybe not finding the license file?
it should work.
On Linux, i sometimes use strace -f $MAIN/bin/basex myquery.xq |& grep saxon and see where the open system call succeeds. (you can get more sophisticated with strace but i don’t know which operating system you use).
Liam
basex-talk@mailman.uni-konstanz.de