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

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

In XPath 2.0, if you want to remove duplicates from a sequence of nodes
$seq
, and sort them into document order, you can write
$seq/.
, or equivalently,
./$seq
. The sorting and deduplication is part of the defined behavior of the
/
operator.

Function Calls

A
FunctionCall
invokes a function. This may be one of the system-defined functions described in Chapter 13, or it may be a vendor- or user-supplied function.

Each built-in or user-defined atomic type also has a corresponding constructor function available for constructing values of that type (for example,
xs:date(‘2008-02-29’)
constructs a date).

There may also be additional functions described in a host language in which XPath is embedded—for example, the XForms standard defines a number of additional XPath functions. Some of these duplicate functionality that is now in the standard XPath 2.0 library, but others define functionality specific to the XForms environment; for example, the
instance()
function, which provides access to an XML document that holds the data collected using an interactive form.

Expression
Syntax
FunctionCall
QName
(
( ExprSingle (
,
ExprSingle)* )?
)
ExprSingle
ForExpr |
QuantifiedExpr |
IfExpr |
OrExpr

Other books

Akasha 4 - Earth by Terra Harmony
Captive to the Dark by Alaska Angelini
No Ordinary Joes by Larry Colton
Banishing Verona by Margot Livesey
The Warrior's Reward by Samantha Holt
Vampire Lane by Anjela Renee
This Time by Rachel Hauck
Sedition by Katharine Grant
Atonement by Ian McEwan