Returns a new sequence containing all the items of $target
except the item
at position $position
.
fn:remove
( $target
as item()*
,$position
as xs:integer
item()*
The function returns a sequence consisting of all items of $target
whose
index is less than $position
, followed by all items of $target
whose index is greater than $position
.
let $abc := ("a", "b", "c")
The expression fn:remove($abc, 0)
returns ("a", "b", "c")
.
The expression fn:remove($abc, 1)
returns ("b", "c")
.
The expression fn:remove($abc, 6)
returns ("a", "b", "c")
.
The expression fn:remove((), 3)
returns ()
.
If $position
is less than 1 or greater than the number of items in
$target
, $target
is returned.
If $target
is the empty sequence, the empty sequence is returned.