Returns the number of members in the supplied array.
array:size
( $array
as array(*)
xs:integer
If $array
is empty the function returns zero.
Otherwise, the function returns the number of members in $array
.
The expression array:size(["a", "b", "c"])
returns 3
.
The expression array:size(["a", ["b", "c"]])
returns 2
.
The expression array:size([ ])
returns 0
.
The expression array:size([[ ]])
returns 1
.
Note that because an array is an item, the fn:count
function when applied to an array always returns 1 (one).