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

Fever Pitch by Ann Marie Frohoff
Every Night I Dream of Hell by Mackay, Malcolm
Invisible by L.A. Remenicky
Barabbas by Par Lagerkvist
Beyond the Summit by Linda Leblanc
A Rare Gift by Jaci Burton
The Insistent Garden by Rosie Chard
Good Husband Material by Trisha Ashley
Better Off Dead by Sloan, Eva
Restless by William Boyd