Saxon.Api

 

 

Saxon.Api

Class XdmFunctionItem

Direct Known Subclasses
XdmArray, XdmMap

public class XdmFunctionItem
extends XdmItem

The class XdmFunctionItem represents an item in an XDM sequence that holds a function.

Note that there is no guarantee that every XdmValue comprising a single function item will be an instance of this class. To force this, use the Simplify property of the XdmValue.

At present the only way of creating an instance of this class is as the result of an XPath or XQuery expression that returns a function item.

Property Summary

 int Arity

The arity of the function, that is, the number of arguments it expects

 QName FunctionName

The name of the function, as a QName

 

Method Summary

 XdmValue Invoke(XdmValue[] arguments, Processor processor)

Invoke the function

 bool IsAtomic()

Determine whether the item is an atomic value

 

Property Detail

Arity

public int Arity {get; }

The arity of the function, that is, the number of arguments it expects

Returns:

The number of arguments that the function takes

FunctionName

public QName FunctionName {get; }

The name of the function, as a QName

Returns:

The name of the function. The result will be null if the function is anonymous.

Method Detail

Invoke

public XdmValue Invoke(XdmValue[] arguments,
Processor processor)

Invoke the function

Parameters:

arguments - The arguments to the function
processor - The Saxon processor, used to provide context information

Returns:

The result of calling the function

IsAtomic

public override bool IsAtomic()

Determine whether the item is an atomic value

Returns:

false (a function item is not an atomic value)