Return number of items in the current sequence.
fn:last => unsignedInt?
This context function returns the number of items in the sequence of items that is currently being processed. The function returns the empty sequence if the context is the empty sequence.
Retrieve the current German chancellor:
let $chancellors := ("Adenauer", "Erhard", "Kiesinger", "Brandt", "Schmidt", "Kohl", "Schröder", "Merkel") return <info>Current German chancellor is: { $chancellors[last()] }.</info>
The query returns that string value from $chancellors
sequence which is the last sequence item.
The following construct(s) refer to this construct: