Project

Profile

Help

Bug #4162

closed

No error at export time if stylesheet calls function-lookup() and target environment (JS, HE) does not support HOF

Added by Michael Kay about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT export
Sprint/Milestone:
-
Start date:
2019-03-10
Due date:
% Done:

100%

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

Description

If a stylesheet that contains calls to higher-order functions (such as fn:function-lookup() or fn:sort()) is exported with target:JS or target:HE, we should report an error at export time rather than allowing it to fail when the stylesheet is reloaded.

Actions #1

Updated by Michael Kay about 5 years ago

Note that the Transform command line currently supports -target:EE | PE | HE | JS | JS2, but XslPackage.save() is documented as supporting only JS and JS2. XsltCompiler supports the set of 5 values.

In fact there's a bit of a problem with XslPackage.save#2, since it can specify a different target edition from that of the compiler.

Actions #2

Updated by Michael Kay about 5 years ago

  • Status changed from New to Resolved
  • Applies to branch 9.9, trunk added
  • Fix Committed on Branch 9.9, trunk added

I have changed StylesheetPackage.createFunctionLibrary() to exclude the HOF functions when the target edition is HE or JS. (TODO: need multiple edition names for JS2?).

I have deprecated XsltPackage.save(File, target) since the target should be specified when the compiler is created.

Actions #3

Updated by O'Neil Delpratt almost 5 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.9.1.3 added

Bug fix applied to the Saxon 9.9.1.3 maintenance release

Please register to edit this issue

Also available in: Atom PDF