Project

Profile

Help

Bug #4547

closed

Cannot export a package containing abstract components

Added by Michael Kay almost 4 years ago. Updated almost 4 years ago.

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

100%

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

Description

Using the command line:

net.sf.saxon.Transform -xsl:override-base-f-001.xsl -export:override-base-f-001.sef -nogo

fails

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.

Actions #1

Updated by Michael Kay almost 4 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.

Actions #2

Updated by Michael Kay almost 4 years ago

  • Status changed from New to Resolved
Actions #3

Updated by O'Neil Delpratt almost 4 years ago

  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 10.1 added

Bug fix committed in the Saxon 10.1 maintenance release.

Actions #4

Updated by O'Neil Delpratt almost 4 years ago

  • Status changed from Resolved to Closed

Please register to edit this issue

Also available in: Atom PDF