home contribute faq download

FunctX XSLT Functions

fn:remove

Removes an item from a sequence

Google
Webxsltfunctions.com

Description

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

This description is © Copyright 2007, Priscilla Walmsley. It is excerpted from the book XQuery by Priscilla Walmsley, O'Reilly, 2007. For a complete explanation of this function, please refer to Appendix A of the book.

Arguments and Return Type

NameTypeDescription
$target item()* the sequence to remove an item from
$position xs:integer the position to remove the item from
return value item()*

Examples

XPath ExampleResults
remove( ('a', 'b', 'c'), 2) 
('a', 'c')
remove( ('a', 'b', 'c'), 10)
('a', 'b', 'c')
remove( ('a', 'b', 'c'), 0)
('a', 'b', 'c')

History

Published OnLast UpdatedContributor(s)
2006-06-272007-02-26W3C, XQuery 1.0 and XPath 2.0 Functions and Operators, http://www.w3.org/TR/xpath-functions/
Datypic XSLT Services

Recommended Reading:

XQuery