Chapter 5. Functions
This chapter contains an alphabetical reference of the 36 functions contained in the XPath and XSLT languages. The majority of these come from XPath.
The XPath recommendation itself groups its 27 functions into four categories, according to their role, as shown in Table 5-1.
The only function in XPath 1.0 that returns a node-set is the
id( ) function. The rest return a number, string, or boolean.
XSLT adds nine functions of its own:
Of these, three return a node-set:
key( ), and
current( ). The other functions return a number, string, or boolean.
Data Type Conversions
XSLT and XPath are dynamically typed languages. Whenever it is possible for the XSLT processor to convert a given value to a value of the expected data type, it does so automatically. The particular rules for converting to each of the four XPath data types are described next.
When being converted to another data type, result tree fragments ...