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

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

There has been a lot of confusion about whether and where hyphens are allowed within square brackets, other than their two special meanings to indicate a codepoint range such as
[0-9]
and a subtraction such as
[A-Z-[IO]]
. At one stage an erratum was issued making any usage such as
[+-]
invalid, but this was subsequently withdrawn. In the second edition of XML Schema Part 2, the grammar and the textual narrative are inconsistent. If you want to be safe, escape any hyphen that is intended to represent the hyphen character itself, for example
[+\-]
.

Single character escapes
are described in the following section.

Character Class Escapes

The next table describes various constructs introduced with a backslash (
\
). These constructs are known collectively as
character class escapes
(
charClassEsc
); each character class escape defines a subset of the Unicode character set, and it can appear either at the top level of a regular expression (as an atom), or within square brackets. Within this category, a
single character escape
(
SingleCharEsc
) represents a single Unicode character; these can also appear as the start or end of a character range, as we saw in the previous section.

Construct
Syntax
charClassEsc
SingleCharEsc | MultiCharEsc | catEsc | complEsc
SingleCharEsc
\
(
n
|
r
|
t
|
\
|
|
|
.
|
?
|
BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
9.76Mb size Format: txt, pdf, ePub
ads

Other books

Stalking Ground by Margaret Mizushima
Project 731 by Jeremy Robinson
Cruise to Murder (Z & C Mysteries, #2) by Kane, Zoey, Kane, Claire
Saint/Sinner by Sam Sisavath
Entwined (Intergalactic Loyalties) by Smith, Jessica Coulter
No sin mi hija by Betty Mahmoody, William Hoffer
Save My Soul by K.S. Haigwood
House of Doors by Chaz Brenchley
Beneath a Dakota Cross by Stephen A. Bly
The PuppetMaster by MacNair, Andrew L.