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
2.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

Pandora Gets Lazy by Carolyn Hennesy
Sárkányok tánca by George R. R. Martin
Willing Hostage by Marlys Millhiser
The Sultan's Eyes by Kelly Gardiner
In Pieces by Nick Hopton
Cado by Dyllin, D.T.
Rewarded by Jo Davis