array:subarray

Returns an array containing all members from a supplied array starting at a supplied position, up to a specified length.

subarray($array as array(*), $start as xs:integer) ➔ array(*)

Arguments

 

$array

array(*)

The input array

 

$start

xs:integer

The starting position

Result

array(*)

subarray($array as array(*), $start as xs:integer, $length as xs:integer) ➔ array(*)

Arguments

 

$array

array(*)

The input array

 

$start

xs:integer

The starting position

 

$length

xs:integer

The specified length

Result

array(*)

Namespace

http://www.w3.org/2005/xpath-functions/array

Links to W3C specifications

XPath 3.1 Functions and Operators

Notes on the Saxon implementation

Available since Saxon 9.7.