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

Day of Deliverance by Johnny O'Brien
The Firebird Mystery by Darrell Pitt
SPY IN THE SADDLE by DANA MARTON,
Past Tense by Catherine Aird
Triple Exposure by Colleen Thompson
Ferran's Map by T. L. Shreffler
The Beach House by Young, Chloe
Game of Temptation by Santoso, Anda J.
Ruby Reinvented by Ronni Arno