last — Returns the context size from expression evaluation context.


number last ( void);


Context size is the number of nodes in the node-set where the context node comes from. For the most popular case, when last() is used inside a predicate, and the predicate relates to some axis of the path, last() is the number of elements found by that axis at once; in other words, the number of elements to be tested by predicate.

Return Types

Positive integer.


Example24.597.Call of last() inside a predicate

Find all waybills with more than one <address> child inside the <waybill> element.


See Also

position() count()