Version 9.5 SP1
 —  X-Query Reference Guide  —

Predicate

Select a node subset by using a predicate expression


Syntax

Predicate

[ PredicateExpr ]

Top of page

Description

You can use a Predicate in a location step or in a filter expression, both of which identify a node-set. This node-set is then restricted by applying the PredicateExpr can be used to filter a node set in a location step.

A predicate can either be a Boolean expression or a numeric expression. A numeric predicate [n] is short for [position()=n] which is true for all nodes that are the nth child element in the input node set. If the value of the predicate is not a number, then it is treated as a Boolean expression.

Top of page

Compatibility

It corresponds to the expression Predicate defined in XPath, Section 2.4, Rule 8.

Top of page

Examples

Top of page

Related Expressions

FilterExpr Step

Top of page