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

Death Thieves by Julie Wright
Between Sisters by The Queen
Doppelganger by David Stahler Jr.
Shame of Man by Piers Anthony
Far Horizon by Tony Park
The Last Girl by Penelope evans
Vestige by Deb Hanrahan
Mommy Midwife by Cassie Miles