home contribute faq download

FunctX XSLT Functions

fn:exists

Whether an argument is the empty sequence

Google
Webdatypic.com

Description

The fn:exists function returns true if the sequence contains one or more items; it is the opposite of the fn:empty function. It is often unnecessary to call the fn:exists function because sequences are automatically converted to the effective boolean value where a boolean value is expected.

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

NameType
$arg item()*
return value xs:boolean

Examples

XPath ExampleResults
exists( ('a', 'b', 'c') )
true
exists( '' )
true
exists( () )
false
exists( false() )
true

See Also

fn:emptyWhether a value is the empty sequence
fn:booleanThe effective boolean value of a sequence

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