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

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

. You also need to be careful with the humble
.
character, which can appear in several different roles in XPath: as a decimal point within a number, as a separator character within a name, and as a symbol in its own right, representing the context item. So, for example if you write
$a is .
(which tests whether variable
$a
refers to the context node), then you need a space between the
is
and the
.
.

Once the text has been split into tokens, the tokens are classified. It is at this stage that the decision is made whether a name such as
div
is being used as an element name in a path expression, as a function name, as a variable name, or as an operator or keyword. As we have seen, the decision on how to classify a token may depend on the tokens that precede and follow it. It's likely that many parsers will also group together compound symbols such as
cast
as
at this stage, though the details of how this is done are left entirely to the implementation.

Other books

The Transfiguration of Mister Punch by Beech, Mark, Schneider, Charles, Watt, D P, Gardner, Cate
Red Hots by Hines, Yvette
Dawn of War by Tim Marquitz
Dollar Down by Sam Waite
Seven for a Secret by Elizabeth Bear
How to Dance With a Duke by Manda Collins
Maid to Order by Penny Birch
Fairy Keeper by Bearce, Amy