Bug #4162
closedNo error at export time if stylesheet calls function-lookup() and target environment (JS, HE) does not support HOF
100%
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.
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.
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.
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