remove

Removes an item from a sequence

Description

The fn:remove function returns a copy of $target with the item at position $position removed. Position numbers start at 1, not 0.

Parameters

Description

target:item()

the sequence to remove an item from

position:integer()

the position to remove the item from

Examples

XPath

Results

remove( (‘a’, ‘b’, ‘c’), 2)

(‘a’, ‘c’)

remove( (‘a’, ‘b’, ‘c’), 10)

(‘a’, ‘b’, ‘c’)

remove( (‘a’, ‘b’, ‘c’), 0)

(‘a’, ‘b’, ‘c’)