Project

Profile

Help

Bug #3148

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

Added by John Lumley about 1 year ago. Updated 10 months ago.

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

100%

Applies to JS Branch:
1.0
Fix Committed on JS Branch:
1.0
Fixed in JS Release:
SEF Generated with:
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.

History

#1 Updated by Michael Kay about 1 year 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?

#2 Updated by John Lumley about 1 year 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.

#3 Updated by John Lumley about 1 year ago

  • Status changed from New to Resolved

Alterations to code committed

#4 Updated by Debbie Lockett 10 months ago

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

#5 Updated by Debbie Lockett 10 months 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