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

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

The way this rule works is that within a comment, you can have a sequence of things, each of which is either a character or a comment. Since the system always looks for the longest matching construct, if it sees
(:
within a comment then it will interpret this as the start of a nested comment, rather than as two ordinary characters.

Changes in XPath 2.0

XPath 1.0 provided no way of writing comments within an expression. The facility has become necessary because with the introduction of conditional expressions,
for
expressions, and the like, XPath 2.0 expressions can be much longer and more complex.

Numeric Literals

Numeric literals represent constant numbers. There are three types of number that can be written as constants within an XPath 2.0 expression; these correspond to the types
xs:integer
,
xs:decimal
, and
xs:double
. The type of the value is inferred from the way it is written. The rules are shown in the table below.

Symbol
Lexical Rules
IntegerLiteral
Digit+
DecimalLiteral
(
.
Digit+) | (Digit+
.
Digit*)
DoubleLiteral
((
.
Digit+) | (Digit+(
.
Digit*)?)) (
e
|
E
) (
+
|

)? Digit+

Other books

Cursed by the Sea God by Patrick Bowman
Drawing Dead by DeCeglie, JJ
Why We Took the Car by Wolfgang Herrndorf
The Book of Disquiet by Fernando Pessoa
Phantom Prey by John Sandford
Escape from Camp 14 by Blaine Harden
The Black Box by Michael Connelly