saxon:items-after

Returns the subsequence of the input starting with the item after the first one that matches the predicate.

items-after($input as item()*, $predicate as function(item()) as xs:boolean) ➔ item()*

Arguments

 

$input

item()*

The input sequence

 

$predicate

function(item()) as xs:boolean

Function determining the start condition

Result

item()*

Namespace

http://saxon.sf.net/

Saxon availability

Requires Saxon-PE or Saxon-EE. Implemented since Saxon 10.

Notes on the Saxon implementation

Available from Saxon 10.

Details

This function returns a contiguous subsequence of the input sequence, starting with the item immediately after the first one that matches the $predicate condition, and ending at the end of the input sequence.

If no item in the input sequence matches the $predicate condition, or if the first item to match is the last item in the input, then the result is an empty sequence.

Example: saxon:items-after(1 to 20, function($x){$x mod 10 = 0}) returns the sequence 11 to 20.

In XSLT, calls on saxon:items-after are streamable provided that the function supplied as the predicate is either (a) a reference to a user-declared stylesheet function declared with streamability="inspection", or (b) an inline function whose body is grounded and motionless. More specifically, if the predicate function satisfies these conditions then the posture and sweep of the function call are the same as the posture and sweep of the first argument.

See also:

saxon:items-before()

saxon:items-from()

saxon:items-until()