Function items
Function items are XDM items that can be called using a dynamic function call. For
instance, the function represented by a function item $f can be invoked
using a dynamic function call $f(args). A function item is a third
kind of item, alongside nodes and atomic items; these were added explicitly to the XDM
type system from XPath 3.0. There are a number of XPath constructs that can be used to
produce a function item, including:
- named function reference
- inline function
- partial function application
- map constructor
- array constructor
From XPath 4.0, function items have an identity property, which can be used to test whether two variables refer to the same function item or not. (Implemented from Saxon 13.)
The following subsections provide more information about the use of function items, and in particular describe new syntax and semantics introduced in the 4.0 specifications: