Return subsequence of a sequence.
fn:subsequence(sequence $sequence, double $start) => sequence
fn:subsequence(sequence $sequence, double $start, double $length) => sequence
This function returns a subsequence of $sequence
, which
begins at $start
and contains the next
$length
entries, if a third parameter is provided.
$sequence |
sequence |
---|---|
$start |
double value: the position at which the subsequence starts |
$length |
double value: the length of the subsequence |
Return all entries starting from the 5th:
let $seq := (1,2,3,4,5,6,7) return subsequence($seq,5)
This returns (5,6,7).
Return three entries starting from the 2nd:
let $seq := (1,2,3,4,5,6,7) return subsequence($seq,2,3)
This returns (2,3,4).
The following construct(s) refer to this construct: