XSLT Functions

0
10
XSLT Functions
XSLT includes over 100 built-in functions. There are functions for string values, numeric values, date and time comparison, node and QName manipulation, sequence manipulation, Boolean values, and more.
Note: XQuery 1.0, XPath 2.0, and XSLT 2.0 share the same functions library.
The following XSLT and XPath functions should return true if a processor supports the W3C XSLTstandard.
boolean name
ceiling namespace-uri
concat normalize-space
contains not
count number
current position
document round
element-available starts-with
false string
floor string-length
format-number substring
function-available substring-after
generate-id substring-before
id sum
key system-property
lang translate
last true
local-name unparsed-entity-uri
XSLT extends the set of available functions with these:
node-set document(object, node-set?)
Allows XSLT to access the nodes in another document
node-set key(keyname, object) 

Returns the nodes that match object in the specified key

string format-number(number, formatstring, [decimalformat]) 

Returns the string representation of number using the formatstring specified and the decimalformat (or the default decimal format)

node-set current() 

Returns the current context node

string unparsed-entity-uri(string) 

Returns the URI of the specified unparsed entity

string generate-id(node-set)

Returns a string which uniquely identifies the specified node, or the first node in document order

object system-property(string)

Returns the value of the specified system property

boolean element-available(string) 

Returns true if the specified element is available in the implementation

boolean function-available(string)

Returns true if the specified function is available in the implementation function-name
The function-name argument is simply the qname of the function that you wish to test. A qname is an XML name with an optional prefix. If the value is not of type string, it will automatically be converted to a string by the XPath string() function.
Boolean = function-available(function-name) 

The function-available function is used to test whether the function specified in the argument is supported by the XSLT processor. Currently, this is important when dealing with proprietary functions. In the future, this function will gain additional importance when you have to content with more than one version of the W3C XSLT standard.

If the function is supported, true is returned. If the function is not supported, false is returned.