fn:remove

Removes the items at the given positions in a sequence.

remove($input as item()*, $positions as xs:integer*) ➔ item()*

Arguments

 

$input

item()*

The input sequence, from which items are to be removed

 

$positions

xs:integer*

The positions of the items to be removed

Result

item()*

Namespace

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

Links to W3C specifications

XPath 3.1 Functions and Operators

XPath 4.0 Functions and Operators

Saxon availability

Available in XPath 2.0, XSLT 2.0, XQuery 1.0, and later versions. Available in all Saxon editions. Available for all platforms.

Notes on the Saxon implementation

In the XPath 4.0 specification, the function is extended to allow several items to be removed at the same time. This extension is available since Saxon 13 in XPath 4.0, and available since Saxon 12.3 provided that syntax extensions are enabled.