Project

Profile

Help

Bug #4532

closed

Compiling package to SEF fails when the package (a) uses keys, and (b) was itself loaded from a SEF file

Added by Jeremy Cronk over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT 3.0 packages
Sprint/Milestone:
-
Start date:
2020-04-28
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10, 9.9
Fix Committed on Branch:
10, 9.9
Fixed in Maintenance Release:
Platforms:

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

pkg-with-ext-assets.zip (160 KB) pkg-with-ext-assets.zip files to reproduce Jeremy Cronk, 2020-04-28 22:41
string.xsl (8.81 KB) string.xsl Source of string.sef Jeremy Cronk, 2020-05-08 18:46
al3-dictionary.xsl (3.91 KB) al3-dictionary.xsl Source of al3-dictionary.sef Jeremy Cronk, 2020-05-08 18:47
al3-meta-info.xsl (5.33 KB) al3-meta-info.xsl Additional source of al3-dictionary.sef Jeremy Cronk, 2020-05-08 18:47
map.xsl (3.42 KB) map.xsl Dependency of al3-dictionary Jeremy Cronk, 2020-05-08 18:47
array.xsl (1.22 KB) array.xsl Dependency of al3-dictionary Jeremy Cronk, 2020-05-08 18:47

Please register to edit this issue

Also available in: Atom PDF