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, 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| Name | Type |
$arg |
item()* |
| return value |
xs:boolean |
Examples| XPath Example | Results | Explanation |
|---|
not(32 > 20) |
false |
not(doc(
'https://www.datypic.com/functx./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 |
Recommended Reading: 
|