Cannot export a package containing abstract components
Using the command line:
net.sf.saxon.Transform -xsl:override-base-f-001.xsl -export:override-base-f-001.sef -nogo
Error XTSE3080 The package is not executable, because it contains abstract components: function p:f-abstract#2
The error should not occur unless we actually attempt execution.
Updated by Michael Kay about 2 years ago
- Fix Committed on Branch 10 added
A bit tricky to fix this. The command-line with
-nogo option is compiling the stylesheet as if it were to execute, and then simply skips the execution phase; up till then the logic is essentially "compile complete stylesheet" rather than "compile free-standing package". My first instinct was to try and defer the error check (or the reporting of the error) until
PreparedStylesheet.newController(); but that method doesn't throw an exception, and if it did, then
XsltExecutable.load() would have to throw an exception, which is an unpleasant API change.
I've added a special path to the already tortuous
Transform.doTransform() method: if
export && !run (i.e. the -export and -nogo options are set) then it uses
compilePackage rather than
compile, which doesn't require the package to be executable.
Making this change for 10.0 only in the interests of stability.
Please register to edit this issue