Bug #4532
closedCompiling package to SEF fails when the package (a) uses keys, and (b) was itself loaded from a SEF file
100%
Description
I have an XSLT package which depends on another XSLT package with external assets (an XML file and a JSON file). The package with external assets compiles with no problems, and if I try to run my XSpec tests on the SEF file for this package, they run with no errors (this was done by creating a test stylesheet that used the package and then made its functions public in xsl:accept).
However, when I try to compile a the package depending on this one, I get a confusing error. I'm attaching a mock-up that illustrates the issue.
I'm running saxon9ee.jar with the config set, relocate on, nogo, and an export path to formatters.sef. This is roughly the same command that successfully compiled everything else I've tried to date.
I get this stack trace:
java.lang.UnsupportedOperationException
at net.sf.saxon.trans.KeyDefinition.export(KeyDefinition.java:353)
at net.sf.saxon.expr.Component.export(Component.java:229)
at com.saxonica.ee.trans.StylesheetPackageEE.export(StylesheetPackageEE.java:160)
at com.saxonica.ee.trans.StylesheetPackageEE.export(StylesheetPackageEE.java:151)
at com.saxonica.ee.trans.StylesheetPackageEE.export(StylesheetPackageEE.java:92)
at net.sf.saxon.s9api.XsltExecutable.export(XsltExecutable.java:156)
at net.sf.saxon.s9api.XsltExecutable.export(XsltExecutable.java:133)
at net.sf.saxon.Transform.doTransform(Transform.java:776)
at net.sf.saxon.Transform.main(Transform.java:80)
I asked about this on the mailing list, and Michael Kay told me to try adding -opt:-k to disable a key optimization and see if that worked, but when I tried it I received the same error.
Files
Please register to edit this issue