Project

Profile

Help

Feature #1684

API to query the availability of a function

Added by Romain Deltour over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2013-01-11
Due date:
% Done:

0%

Spent time:
-
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:

Description

It is currently possible to query the availability of an extension function in a known library, and the Configuration object exposes two such function libraries: the vendor functions and the integrated extension functions.

However, some functions couldn't be found in any of these libraries: e.g. saxon:line-number and saxon:column-number, tested with Saxon EE.

It would be convenient to have a general API on the Configuration object to query the availability of a function, independently of the function library it is registered in.

History

#1 Updated by Michael Kay over 3 years ago

  • Status changed from New to In Progress
  • Assignee set to Michael Kay

Not all functions are global to the Configuration; for example XSLT functions such as current() are local to XSLT, and some functions are available only if XPath 3.0 is enabled.

I would suggest creating an IndependentContext supplying the Configuration as an argument, optionally calling setXPathLanguageLevel(), and then calling getFunctionLibrary().getFunctionSignature(name, arity).

#2 Updated by Romain Deltour over 3 years ago

I see, makes perfect sense. The suggested API is a satisfying workaround. Thanks!

On 11 janv. 2013, at 16:17, Saxonica Developer Community <> wrote:

#3 Updated by Michael Kay over 3 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF