not
Negates a boolean value
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.
Parameters |
Description |
---|---|
arg:boolean() |
Examples
XPath |
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 |