Hi,
I was using an XSLT 2 stylesheet to transform xqdoc XML to Markdown. I already had a stylesheet that did the same with HTML. This stylesheet is XSLT 2 and uses Saxon HE which is located inside the BaseX lib directory. Saxon HE is picked up just fine with xslt:transform and xslt:transform-text. I used this as basis for the conversion to markdown.
Then I added an xsl:function called i:code-block and suddenly got this error message:
[bxerr:BXSL0001] ERROR: 'The first argument to the non-static Java function 'codeBlock' is not a valid object reference.' FATAL ERROR: 'Could not compile stylesheet'
Ok, so I changed it to a named template called code-block then I got an error about the string-join used inside. So I re-wrote to not use this xpath function.
[bxerr:BXSL0001] ERROR: 'Invalid conversion from 'com.sun.org.apache.xalan.internal.xsltc.dom.AdaptiveResultTreeImpl' to 'node-set'.'
So something is causing a fallback to Xalan XSLT 1 processor but I cannot undersand why. However, if I remove all functions and named templates this same stylesheet is compiled and executed fine using Saxon again!!??
If necessary I can add some more code.
--Marc