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

Daughter of Lir by Judith Tarr
Tenderness by Robert Cormier
Who Let That Killer In The House? by Sprinkle, Patricia
Five for Forever by Ames, Alex
Celebrity Bride by Alison Kervin
Day of the Delphi by Jon Land
Martha Washington by Patricia Brady