Tamino XML Server Version 9.7
 —  X-Query Reference Guide  —

RelationalExpr

Compare two values by using relational operators.


Syntax

RelationalExpr

graphics/RelationalExpr.jpg

Top of page

Description

A RelationalExpr can be a simple AdditiveExpr or two or more AdditiveExpr expressions that are operands to one of the four relational operators < (less than), > (greater than), <= (less than or equal), and >= (greater than or equal). The comparison results in a Boolean value "true" or "false".

You can compare numeric values as well as string values, which are compared according to lexicographic ordering. If there is a collation defined for either of the operands or if both operands have the same collation defined, then the comparison is based on this collation, otherwise it is character-based.

Top of page

Compatibility

It is compatible to the expression RelationalExpr defined in XPath, Section 3.4, Rule 24. However, in XPath RelationalExpr is restricted to comparison of numeric values.

In contrast to XSLT there is no need to use entity references for the "<" and ">", since the query string is not processed as an XML instance. But in XSLT a RelationalExpr appears as an attribute value and must therefore be referenced; the first example would look as follows: /patient/[born &lt; 1959].

Top of page

Examples

Top of page

Related Expressions

BetweenExpr EqualityExpr

Top of page