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

Firefly Beach by Luanne Rice
The Black Snow by Paul Lynch
Shutter Man by Montanari, Richard
Unforgettable by Lacey Wolfe
False Gods by Louis Auchincloss
Take a Chance by Lavender Daye
Awakened by His Touch by Nikki Logan
Grave Surprise by Charlaine Harris
The Blind Man of Seville by Robert Wilson