XPath set operators

Table 3-2, shows the supported XPath set operators.

Table 3-2: XPath set operators

Operator

Description

union |

Union: union operator (shortcut is '|') returns the combined set of values from the query on the left and the query on the right. Duplicates are filtered out and resulting list is sorted in document order.

intersect

Intersection: intersect operator returns the set of elements in common between two sets.

( )

Group: you can use parentheses to group collection operators.

. (dot)

Period: dot term is evaluated with respect to a search context. The term evaluates to a set that contains only the reference node for this search context.

Boolean Operators (and and or)

Boolean expressions can be used within subqueries.

and

Boolean “and”.

or

Boolean “or”.