Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XSLT Function insert-before not recognized

Tags:

xml

xslt

I'm creating a xslt file with baseX but the function insert-before is not recognized. It is a standard function (you can see it here http://www.w3schools.com/xpath/xpath_functions.asp) and I also tried to declare the namespace fn like this

xmlns:fn="http://www.w3.org/2005/xpath-functions"

and then call the function with fn:insert-before but it still doesn't work. This is a sample of my code

<xsl:call-template name="temp">
   ....
   <xsl:with-param name="array" select="fn:insert-before($array,$count+1,$succ)"/>
   ...
</xsl:call-template>

Any ideas?


1 Answers

The BaseX documentation at

http://docs.basex.org/wiki/XSLT_Module

states that it uses the default JDK 1.5 XSLT engine by default. This only supports XSLT 1.0. The same page explains how to configure it to run with an XSLT 2.0 engine such as Saxon.

like image 184
Michael Kay Avatar answered Jan 05 '26 06:01

Michael Kay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!