API to query the availability of a function
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.
#1 Updated by Michael Kay over 4 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).
Please register to edit this issue