Project

Profile

Help

Bug #3148

closed

xsl:evaluate doesn't support use of user-defined functions

Added by John Lumley over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2017-02-27
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
1.0
Fix Committed on JS Branch:
1.0
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

within the static context for xsl:evaluate should be

All user-defined functions present in the containing package provided their visibility is not hidden or private;

Currently this is not the case for Saxon-JS and will be somewhat expensive to implement, requiring Expr.evaluate() to search through the package SEF it is called from to find the function definitions, generate signatures and pass through on each invocation. It may be possible to arrange a cache.

Actions #1

Updated by Michael Kay over 7 years ago

Surely this simply requires the XPath processor to have access to context.fixed.userFunctions, which transform.js has already built and which is present in the context object passed to evaluateXDM?

Actions #2

Updated by John Lumley over 7 years ago

Fair enough... context.fixed.userFunctions gives a map of fnName#arity -> body (action) trees. Parent of the body gets the function tree and from their arg children with name and type can be determined.

Actions #3

Updated by John Lumley over 7 years ago

  • Status changed from New to Resolved

Alterations to code committed

Actions #4

Updated by Debbie Lockett over 7 years ago

  • Applies to branch deleted (9.8)
  • Applies to JS Branch 1.0 added
  • Fix Committed on JS Branch 1.0 added
Actions #5

Updated by Debbie Lockett over 7 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to Saxon-JS 1.0.1

Bug fix applied in Saxon-JS 1.0.1 maintenance release.

Please register to edit this issue

Also available in: Atom PDF Tracking page