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

Scabs by White, Wrath James
A Secret History of the Bangkok Hilton by Chavoret Jaruboon, Pornchai Sereemongkonpol
Only You by Bonnie Pega
Possess by J.A. Howell
Dinner with Edward by Isabel Vincent
The Nine Bright Shiners by Anthea Fraser