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

Shadow Bound (Unbound) by Vincent, Rachel
Superhero by Victor Methos
English, Elizabeth by The Border Bride
An Heir of Uncertainty by Everett, Alyssa
Shayla Black by Strictly Seduction
Wild Heart by Patricia Gaffney
Rascal's Festive Fun by Holly Webb