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
5.12Mb 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

Battle Earth III by Nick S. Thomas
Kissed by Ice by Shea MacLeod
The Crown Jewels by Walter Jon Williams
The Accidental Abduction by Darcie Wilde
Stone Lover by A. C. Warneke
Part-Time Devdaas... by Rugved Mondkar
A Taste of Love and Evil by Barbara Monajem
Sentido y Sensibilidad by Jane Austen
Cinderella Has Cellulite by Donna Arp Weitzman
The Debutante by Kathleen Tessaro