Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

XSLT function


May 28, 2021 XSL T


Table of contents


XSLT function

This section explains some of the functions used in XSLT.

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


XSLT function

XSLT contains more than 100 built-in functions. These functions are used for string values, numeric values, date and time comparisons, node and QName operations, sequence operations, Boolean values, and so on.

XSLT function The default prefix for the function namespace is fn.

XSLT function The URI of the function namespace is: http://www.w3.org/2005/xpath-functions

Tip: Functions are often called with the fn: prefix, such as fn:string(). However, since fn: is the default prefix for the namespace, the name of the function does not have to be prefixed when called.

You can access reference manuals for all built-in XSLT 2.0 functions in our XPath tutorial.

In addition, the built-in XSLT functions are listed below:

name describe
current() Returns the current node.
document() Used to access the nodes in the external XML document.
element-available() Detect whether the XSLT processor supports the specified element.
format-number() Convert digital to a string.
function-available() Detect whether the XSLT processor supports the specified function.
generate-id() Returns a string value that uniquely identifies the specified node.
key() 通过使用由 <xsl:key> 元素规定的索引号返回节点集。
system-property() Returns the value of the system properties.
unparsed-entity-uri() Returns the URI of the unrequestical entity.
In the next section, we'll begin to cover the functions in the table above in detail.