Feature #1684
closedAPI to query the availability of a function
0%
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.
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).
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 dropbox+saxonica+f38e@plan.io wrote:
Updated by Michael Kay about 11 years ago
- Status changed from In Progress to Closed
Please register to edit this issue