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.41Mb 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

Bardelys the Magnificent by Rafael Sabatini
Resist the Red Battlenaut by Robert T. Jeschonek
A Night of Errors by Michael Innes
A Knight at the Opera by Kenneth L. Levinson
Diving Into Him by Elizabeth Barone
The Trust by Norb Vonnegut
A Tale Of Three Lions by H. Rider Haggard
Resurrectionists by Kim Wilkins
Legacy by Tom Sniegoski