Project

Profile

Help

Bug #5826

closed

In static expressions (e.g. use-when), XPath 4.0 functions are never available

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
Features new in 4.0
Sprint/Milestone:
-
Start date:
2023-01-16
Due date:
% Done:

100%

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

Description

In a use-when expression, or other static expression in an XSLT stylesheet, function-available('parse-html') always returns false even when 4.0 is enabled.

Actions #1

Updated by Michael Kay almost 2 years ago

Fixed by making UseWhen30FunctionLibrary have two instances, one for 31 and one for 40 (following the design of MapFunctionSet and ArrayFunctionSet); in UseWhenStaticContext, use the 31 or 40 version depending on Feature.ALLOW_SYNTAX_EXTENSIONS.

Note, as well as the function library, this also makes XPath 40 syntax available in use-when expressions.

Needs further testing.

Actions #2

Updated by Michael Kay almost 2 years ago

  • Status changed from New to Resolved

Added XSLT40 test case use-when-4001.

After testing, changed the code so it depends on Compilation.getCompilerInfo().getXsltVersion(), rather than depending directly on Feature.ALLOW_SYNTAX_EXTENSIONS.

Actions #3

Updated by Michael Kay almost 2 years ago

I needed to rework this fix because the original involved references from HE code into EE code.

Actions #4

Updated by Michael Kay almost 2 years ago

Note, not planning to fix this for 11.x

Actions #5

Updated by O'Neil Delpratt almost 2 years ago

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

Bug fix applied in the Saxon 12.1 maintenance release.

Please register to edit this issue

Also available in: Atom PDF