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

Murder on the Horizon by M.L. Rowland
Acts of the Assassins by Richard Beard
B000XUBEHA EBOK by Osborne, Maggie
Death of A Doxy by Stout, Rex
Andrew Lang_Fairy Book 06 by The Grey Fairy Book
Pretty Little Devils by Nancy Holder
Flowers for the Dead by Barbara Copperthwaite
Conquest by Victoria Embers
The Miracle Thief by Iris Anthony