How Boolean Works in XPath Functions

This topic describes how Boolean functions work in XPath functions in the Expression editor.

Using Boolean elements in XPath functions

XPaths that select element values always return strings, even if the XSD data type is Boolean. If you use elements with an XSD boolean type in an XPath expression, you must be aware of how the Boolean type is treated in XPath.

When an element is evaluated for use as a Boolean argument, it is first converted to a Boolean according to the following rules:

Examples:

These conditions apply to the XPath and, or, and not functions.

Using Boolean expressions in XPath functions

When an extension function requires a Boolean argument, use the XPath functions true() or false().

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com