functx:all-whitespace
Whether a value is all whitespace or a zero-length string
Description
The functx:all-whitespace function tests whether a string (or node that is atomized) is all whitespace or empty. If $arg is the empty sequence, it returns true.
Parameters |
Description |
---|---|
arg:string() |
the string (or node) to test |
Examples
XPath |
Results |
---|---|
functx:all-whitespace(’ ‘) |
true |
functx:all-whitespace(’ x ‘) |
false |
functx:all-whitespace($in-xml/a) |
true |
functx:all-whitespace($in-xml/b) |
false |
functx:all-whitespace($in-xml/c) |
false |
functx:all-whitespace($in-xml/c/text()[1]) |
true |