net.sf.saxon.om

Interface FunctionItem

public interface FunctionItem extends Item, Serializable

XQuery 1.1 introduces a third kind of item, beyond nodes and atomic values: the function item. Function items implement this marker interface. The actual implementation class is in Saxon-PE and Saxon-EE only.
Method Summary
FunctionItemcurry(int arg, ValueRepresentation value)
Curry a function by binding one of its arguments
intgetArity()
Get the arity of the function
FunctionItemTypegetFunctionItemType()
Get the item type of the function item
StructuredQNamegetFunctionName()
Get the name of the function, or null if it is anonymous
ValueRepresentationinvoke(ValueRepresentation[] args, XPathContext context)
Invoke the function

Method Detail

curry

public FunctionItem curry(int arg, ValueRepresentation value)
Curry a function by binding one of its arguments

Parameters: arg the argument to be found (1-based) value the value to which the argument is to be bound

getArity

public int getArity()
Get the arity of the function

Returns: the number of arguments in the function signature

getFunctionItemType

public FunctionItemType getFunctionItemType()
Get the item type of the function item

Returns: the function item's type

getFunctionName

public StructuredQName getFunctionName()
Get the name of the function, or null if it is anonymous

Returns: the function name, or null for an anonymous inline function

invoke

public ValueRepresentation invoke(ValueRepresentation[] args, XPathContext context)
Invoke the function

Parameters: args the actual arguments to be supplied context the XPath dynamic evaluation context

Returns: the result of invoking the function

Throws: net.sf.saxon.trans.XPathException