Description
The fn:not function accepts a sequence of items, from which it calculates the effective boolean value of the sequence as a whole before negating it. This means that when $arg is either a single boolean value false, a zero-length string, the number 0 or NaN, or the empty sequence, it returns true. Otherwise, it returns false.
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 | Explanation |
|---|
not(32 > 20)
|
false
|
not(doc(
'http://www.functx.com/input/catalog.xml')
//product)
|
false |
there is at least one product element in catalog.xml |
not(true())
|
false
|
not(())
|
true
|
not('')
|
true
|
not(0)
|
true
|
not(<e>false</e>)
|
false
|
See AlsoHistory |
|