remove($target as item()*, $position as xs:integer) item()*
Returns a new sequence constructed from the value of $target with the item at $position removed.
If $position is less than 1 or greater than the number of items in $target, $target is returned. Otherwise, the value returned by the function consists of all items of $target whose index is less than $position, followed by all items of $target whose index is greater than $position. If $target is the empty sequence, the empty sequence is returned.
$target
The input sequence
$position
The position of the value to be removed
Returns the new sequence with the item at the position specified by the value of $position removed.