Project

Profile

Help

Feature #1684

closed

API to query the availability of a function

Added by Romain Deltour over 11 years ago. Updated about 11 years ago.

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

0%

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

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.

Actions #1

Updated by Michael Kay over 11 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).

Actions #2

Updated by Romain Deltour over 11 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:

Actions #3

Updated by Michael Kay about 11 years ago

  • Status changed from In Progress to Closed

Please register to edit this issue

Also available in: Atom PDF