Precedence of Query Operators

The precedence of query operators varies for XPath 1.0 and XPath 2.0, as shown in the following tables. In these tables, operators are listed in order of precedence, with highest precedence being first; operators in a given row have the same precedence.

Operation Type
XPath Operators
Grouping
( )
               

            
Filter
[ ]
               

            
Unary minus

              - 
               

            
Multiplication
*, div, mod
               

            
Addition
+, -
               

            
Relational (Comparison)
= != < <= > >=
               

            
Union
|
               

            
Negation
not
               

            
Conjunction
and
               

            
Disjunction
or
               

            
Table 52. Query Operator Precedence - XPath 1.0

Operation Type
XPath Operators
Sequence separator
,
               

            
Conjunction
and
               

            
Type matching

              instance of
               

            
Assertion
treat
               

            
Conversion test
castable
               

            
Conversion
cast
               

            
Relational (Comparison)
eg, ne, lt, le, gt, ge, =, !=, <, <=, >, >=, 
is, <<, >>
               

            
Range
to
               

            
Addition
+, -
               

            
Multiplication
*, div, idiv, mod
               

            
Unary
unary -, unary +
               

            
Union
union, |
               

            
Select set
intersect, except
               

            
Navigation
/, //
               

            
Filter
[ ]
               

            
Table 53. Query Operator Precedence - XPath 2.0

Building Web Services With Stylus Studio

This video demonstration shows you how to use Stylus Studio's Web Service call composer to locate a WSDL file on the Internet, inspect, create SOAP envelope, invoke and inspect Web service data.

Canonicalize XML

Stylus Studio® features a handy XML canonicalizer among its many XML editing utilities, for quickly and easily converting any XML document into its canonical form (c14n), a widely-used W3C standard for normalizing XML files.

SQL/XML Tutorial

Many developers need to be able to write applications that work for databases from multiple vendors. This SQL/XML Tutorial refers to SQL/XML, XQuery, and Native XML Programming Languages to do just that.

XQuery Mapper

Stylus Studio has the industry's only XQuery mapper, enabling you to develop sophisticated XML mappings consisting of queries and data transformation in an intuitive, visual manner.

Stylus Most Wanted

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.