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

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

The spec, as published, isn't clear as to what happens when the last character of the string is a newline character. An erratum has been issued to make XPath behave in the same way as other languages that support multiline mode: there is no zero-length line at the end.

The
s
flag

The
s
flag switches on dot-all mode. By default, the meta-character
.
in a regular expression matches any character in the input except a newline (x0A) character. In dot-all mode,
.
matches any character, including a newline.

The
x
flag

The
x
flag causes whitespace in the regular expression to be ignored, except within square brackets. By default, whitespace characters in a regular expression represent themselves, for example, the regex
*
matches a sequence of zero or more spaces. If the
x
flag is set, whitespace in the regex is ignored and can be used to make the layout more readable. Whitespace characters can always be matched using character escapes such as
\s
and
\n
.

Other books

Shallow Breath by Sara Foster
I'm All Yours by Vanessa Devereaux
Artillery of Lies by Derek Robinson
infinities by Grant, John, Brown, Eric, Tambour, Anna, Kilworth, Garry, Queen, Kaitlin, Rowan, Iain, Nagata, Linda, Rusch, Kristine Kathryn, Nicholson, Scott, Brooke, Keith
The Long Ride by Amy Love
Havah by Tosca Lee
Swept Away By a Kiss by Ashe, Katharine
StoneHardPassion by Anya Richards