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.59Mb 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

Little Knell by Catherine Aird
Return From the Inferno by Mack Maloney
Cry Mercy by Mariah Stewart
Giselle's Choice by Penny Jordan
Complete Short Stories by Robert Graves
Still Missing by Chevy Stevens
Another Little Piece by Kate Karyus Quinn