XSLT Functions

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - XSLT Reference

XSLT Functions

XLST functions are used as part of the XPath expressions in an XSLT style sheet to access the current node (current()), merge different XML data files together (document()), maintain version compatibility (element-available() or function-available()), format numbers (format-number()), or check system properties. The following table is a complete list of the XSLT functions as specified in the W3C standard and implemented in MSXML versions 4.0 and later.

Notice that these functions can only be called from within the XSLT processor. Thus, they are not callable from the selectNodes method in the Document Object Model (DOM). This is different from the XPath functions, which can be specified inside the argument to the selectNodes method.

XSLT Functions

current Returns a node set that has the current node as its only member.
document Provides a way to retrieve other XML resources from within the XSLT style sheet beyond the initial data provided by the input stream.
element-available Returns True if and only if the expanded-name is the name of an instruction.
format-number Converts the first argument to a string using the format pattern string specified by the second argument.
function-available Returns True if the function is available in the function library.
generate-id Returns a string that uniquely identifies the node in the node-set argument that is first in document order.
key Retrieves elements previously marked with an <xsl:key> statement.
node-set Converts a tree into a node set. The resulting node always contains a single node and the root node of the tree.
system-property Returns an object representing the value of the system property identified by the name.
unparsed-entity-uri Returns declarations of unparsed entities in the document type definition (DTD) of the source document.

The following are node tests, not functions:

  • text()
  • processing-instruction()
  • comment()
  • node()

For more information, see Node Tests.