public interface ExtensionFunction
Processor
; the function will
then be available for calling from all queries, stylesheets, and XPath expressions compiled
under this Processor.
Extension functions implemented using this interface are expected to be free of side-effects,
and to have no dependencies on the static or dynamic context. A richer interface for extension
functions is provided via the ExtensionFunctionDefinition
class.
Modifier and Type | Method and Description |
---|---|
XdmValue |
call(XdmValue[] arguments)
Call the function.
|
SequenceType[] |
getArgumentTypes()
Declare the types of the arguments
|
QName |
getName()
Return the name of the external function
|
SequenceType |
getResultType()
Declare the result type of the external function
|
QName getName()
SequenceType getResultType()
SequenceType[] getArgumentTypes()
XdmValue call(XdmValue[] arguments) throws SaxonApiException
arguments
- the arguments, as supplied in the XPath function call. These will always be of
the declared types. Arguments are converted to the required types according to the standard XPath
function conversion rules - for example, if the expected type is atomic and a node is supplied in the
call, the node will be atomizedSaxonApiException
- can be thrown if the implementation of the function detects a dynamic errorCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.