Table of Contents

(XSLT|XPATH|XQUERY) - Function

Functions

XQuery 1.0, XPath 2.0, and XSLT 2.0 share the same functions library.

Xpath Functions return a string, a number, or a Boolean value.

For example, the expression /PROJECT/text() gets the string-value of PROJECT nodes.

Many functions depend on the current context. In the preceding example, the context for each invocation of the text() function is the PROJECT node that is currently selected.

For more information about functions, see section 4 of the XPath specification.

Type

Namespace

These functions let you determine the namespace characteristics of a node.

Node-Set

Many XPath expressions select a set of nodes. In essence, they return a node-set.

The id(…) function returns the node with the specified ID (

not the position (ie index)

)

Positional

These functions return positionally based numeric values.

String

These functions operate on or return strings.

Note - XPath defines three ways to get the text of an element:

Boolean

These functions operate on or return Boolean values.

Numeric

These functions operate on or return numeric values.

Conversion

These functions convert one data type to another.