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

Court Out by Elle Wynne
We Are All Made of Stars by Rowan Coleman
Alpha Bloodlines by Kirsty Moseley
Midnight Blue-Light Special by Seanan McGuire
Kiss Me Kill Me by Lauren Henderson
The Stronger Sex by Hans Werner Kettenbach
Hemp Bound by Doug Fine
Her Cyborg by Nellie C. Lind