xsl:function-available
XPATH CORE FUNCTIONS:
The XPath Core Functions are also referred to as the Inherited XPath Functions. These twenty seven (27) functions are defined in the
W3C XML Path Language (XPath) Recommendation Version 1.0
which was released on 16 November 1999. All of these function are very utilitarian in nature.
Note that there are an additional nine (9) XSLT functions which are defined in the
W3C XSL Transformations (XSLT) Recommendation Version 1.0
which was also released on 16 November 1999. See the Function Index for access to the individual XSLT functions.
Note that these function names are used as is, without a prefix. (Some companies offer proprietary XPath functions that usually require a prefixed name.)
boolean
The
Boolean
function converts the
value
argument to a Boolean and returns a true or false.
Syntax:
true | false =
Boolean
(value)
ceiling
The
ceiling
function returns the smallest integer that is equal to or is larger than the numeric value of the
number
argument.
Syntax:
number =
ceiling
(number)
concat
The
concat
function takes all of the individual arguments, concatenates them together in order, and returns the resultant string.
Syntax:
string =
concat
(value1, value2, ...)
contains
The
contains
function determines if the
substring
argument is contained within the
value
argument and, if yes, returns a true. If no, a false is returned.
Syntax:
true | false =
contains
(value, substring)
count
The
count
function counts and returns the number of nodes in a node-set.
Syntax:
number =
count
(node-set)
false
The
false
function return the Boolean value of false. There are no arguments.
Syntax:
false =
false
()
floor
The
floor
function returns the largest integer that is equal to or is smaller than the numeric value of the
number
argument.
Syntax:
number =
floor
(number)
id
The
id
function returns a node-set containing zero or more nodes that have an
attribute that match the
value
argument.
Syntax:
node-set =
id
(value)
lang
The
lang
function tests whether the language specified by the
language
argument matches the language of the context node (which is normally assigned by the
xsl:lang
element). If yes, true is returned. If no, or if no language is assigned to the context node, false is returned.
Syntax:
true | false =
lang
(language)
last
The
last
function returns the position number assigned to the last node in the current node list that is being processed by an
xsl:for-each
or
xsl:apply-templates
element. There are no arguments.
Syntax:
number =
last
()
local-name
The
local-name
function returns the local part of a qname (or an empty string if there is no local name). A qname is composed of an optional prefix, a colon that must be present if there is a prefix, followed by the local name. The local name is dependent on node type. The
node
argument is optional. If omitted, the default is to use the context node.
Syntax:
string =
local-name
(
node
)
name
The
name
function returns the qname of the node. A qname is composed of an optional prefix, a colon that must be present if there is a prefix, followed by the local name. The
node
argument is optional. If omitted, the default is to use the context node.
Syntax:
string =
name
(
node
)
namespace-uri
The
namespace-uri
function returns a string that is the namespace URI of the node cited in the optional
node
argument. If the argument is omitted, the default is to find the namespace URI of the context node.
Syntax:
uri =
namespace-uri
(
node
)
normalize-space
The
normalize-space
function returns a string in which all of the preceding and trailing white space has been removed, and in which all internal sequences of white is replaced with one white space. The
string
argument is optional. If omitted, the default is to use the string value of the context node.
Syntax:
string =
normalize-space
(
string
)
not
The
not
function returns the Boolean negation of the
condition
argument (true becomes false and vice-versa).
Syntax:
true | false =
not
(condition)
number
The
number
function converts the
value
argument to a number. The
value
argument is optional. If omitted, the default is to use the string value of the context node.
Syntax:
number =
number
(
value
)
position
The
position
function returns the position number in the current node list of the node that is currently being processed by an
xsl:for-each
or
xsl:apply-templates
element. There are no arguments.
Syntax:
number =
position
()
round
The
round
function rounds a number to its closest integer.
Syntax:
integer =
round
(number)
starts-with
The
starts-with
function tests whether the string specified in the
string
argument starts with the substring specified in the
substring
argument. If yes, true is returned. If no, a false is returned.
Syntax:
true | false =
starts-with
(string, substring)
string
The
string
function converts the
value
argument to a string. The
value
argument is optional. If omitted, the default is to use the string value of the context node.
Syntax:
=
string
()
string-length
The
string-length
function returns the number of characters in a string. The
string
argument is optional. If omitted, the default is to use the string value of the context node.
Syntax:
number =
string-length
(string)
substring
The
substring
function returns a portion out of the string specified in the
string
argument as determined by the starting point specified in the
start
argument and also by the optional length specified in the
length
argument.
Syntax:
string =
substring
(string, start,
length
)
substring-after
The
substring-after
function returns a portion out of the string specified in the
string
argument that occurs after the substring specified in the
substring
argument.
Syntax:
string =
substring-after
(string, substring)
substring-before
The
substring-before
function returns a portion out of the string specified in the
string
argument that occurs before the substring specified in the
substring
argument.
Syntax:
string =
substring-before
(string, substring)
sum
The
sum
function adds and returns the total value of a set of numeric values that are contained in a node-set.
Syntax:
number =
sum
(node-set)
translate
The
translate
function takes the string in the
value
argument, replaces all occurrences of a string specified in the
string1
argument with substitute characters specified in
string2
argument and returns the modified string.
Syntax:
string =
translate
(value, string1, string2)
true
The
true
function returns the Boolean value of true. There are no arguments.
Syntax:
=
true
()
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information