haXe XPath Documentation
Back | Index
typedef xpath.type.XPathFunction
A function which may be called from within an XPath query. A function call within XPath is an expression, and all XPath expressions are influenced by some context (see xpath.context.Context). This context is passed to the function as the first argument.

XPath functions accept a variable number of dynamically typed parameters, and return a single dynamically typed result. XPath data types are implemented by XPathValue and its subclasses. The parameters passed by the query are therefore passed on to the XPathFunction as an Array of XPathValue, and the XPathFunction returns an XPathValue (which may be null).

A function which for some reason fails to evaluate (for example incorrect parameter count) should throw xpath.XPathEvaluationException.

= xpath.context.Context -> Array<XPathValue> -> XPathValue
Back | Index