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, O'Reilly Media. 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| Name | Type |
$arg |
item()* |
| return value |
xs:boolean |
Examples| XQuery Example | Results |
|---|
exists( ('a', 'b', 'c') )
|
true
|
exists( '' )
|
true
|
exists( () )
|
false
|
exists( false() )
|
true
|
See Also| fn:empty | Whether a value is the empty sequence | | fn:boolean | The effective boolean value of a sequence |
History |
|