Read XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition Online
Authors: Michael Kay
Boolean Expressions
This section concludes the chapter with a description of the operatorsand
and
or
.
There is nonot
operator in XPath, it's provided as a function instead, and is described in Chapter 13, on page 850.
Expression | Syntax |
OrExpr | AndExpr (![]() ![]() |
AndExpr | ComparisonExpr (![]() ![]() |
The syntax shows that theand
operator binds more tightly than
or
, so that
A
and
B
or
C
and
Dmeans
(A
and
B)
or
(C
and
D). Personally, I prefer to use parentheses to avoid any doubt.