The subsequence() function returns part of an input sequence, identified by the start position and length of the sub-sequence required.
For example, the expression «subsequence (("a", "b", "c", "d"), 2, 2) » returns «("b", "c") » .
Argument | Data Type | Meaning |
---|---|---|
sequence | item()* | The input sequence |
start | xs:double | The position of the first item to be included in the result |
length (optional) | xs:double | The number of items to be included in the result. If this argument is omitted, all items after the start position are included |
Result | xs:string | The sequence of items starting at the start position |