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 64. 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 65. Query Operator Precedence - XPath 2.0

XQuery Blasts off at NASA's Johnson Space Center

This is a short story how DynCorp (CSC) used XQuery at NASA's Johnson Space Center to Simplify XML Data Access and Integration

JavaServer Pages IDE (JSP IDE)

The Stylus Studio JSP IDE provides syntax help and code completion for developing JSP 1.2 and JSP 2.0 applications.

Map between EDIFACT and X12

Anything can be mapped to anything: EDIFACT to X12 or vice-versa, either to XML, and any of those to flat files or other formats. Both the XSLT and XQuery mappers can help bridge complex formats with ease.

XSLT Debugger

Stylus Studio's XSLT debugger - a requirement for building bug-free XSLT stylesheets and XML data transformation applications. Stylus Studio's XSLT debugger gives you complete visibility and control over the XSLT transformation process.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member