XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (334 page)

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
13.99Mb size Format: txt, pdf, ePub

. In between union operators and unary operators, there is a long list of operators with intermediate priority, such as
intersect
and
cast as
. A full list of operator priorities, showing how these operators relate to others, is given in Appendix A.

There are two division operators:
div
for exact division, and
idiv
for integer division. The precise rules for these are described below. The
mod
operator gives the remainder when one number is divided by another. The reason that the
/
symbol isn't used for division is that this would conflict with its use in path expressions, which are described in Chapter 9.

When using the minus operator, take care that it does not get confused with a hyphen within a name. If it immediately follows a name, use a space to separate it. Note that
price-discount
(without spaces) is a single hyphenated name, whereas
price

discount
(with spaces) performs a subtraction. If in doubt, use spaces to separate an operator from the surrounding tokens: it never does any harm.

Other books

The Bright Silver Star by David Handler
Tymber Dalton by It's a Sweet Life
Zel by Donna Jo Napoli
Shopaholic & Baby by Sophie Kinsella
Pale Kings and Princes by Robert B. Parker
The Bone Flute by Patricia Bow
Lucky Penny by L A Cotton