What could cause error "Error SXPK0002 Cannot load expression with tag switch. The stylesheet uses Saxon-EE features"
Replies (1)
Please register to reply
Added by Martin Honnen about 1 year ago
While trying to figure why my AOT compilation of a .NET 8 console application using SaxonCS 12.3 for Docbox TNG stylesheets fails to produce any output I experimented with docbook.xsl
compiled by SaxonCS to docbook.xsl.sef
and to run that through the AOT app: that way it at least gives an error message: "Error SXPK0002 Cannot load expression with tag switch. The stylesheet uses Saxon-EE features".
What causes that error (other than obviously my experiment with AOT compilation as otherwise even the sef
runs fine): could that be some use of fn:transform
in docbook.xsl
? What does "tag switch" refer to?
The error message means that the SEF file contains a "switch" instruction, probably the result of optimizing an xsl:choose
instruction, and Saxon-HE cannot execute a switch instruction. You can probably get around it by compiling with target:HE.
Please register to reply