This chapter explores the functions available to you in XSLT, both the built-in XSLT functions and the XPath functions you can use. Youve already seen a number of these functions, such as id , generate-id , position , count , and so on. In this chapter, youll see all the available functions.
Some of the functions available are built into XSLT, and some from within XPath. Both XSLT and XPath are in the process of being upgraded to version 2.0, and at the end of this chapter Ill take a look at the future and what new functions will be appearing. (No new version 2.0 functions have been made public yet.)
The following functions are built into XSLT:
There are many functions from XPath that are also available to you. Ill organize these functions by the XPath data type on which they work. There are four such data types: node sets, strings, numbers , and Booleans. Here are the XPath functions that work on node sets:
local- name ()
These are the XPath functions that work on strings:
These XPath functions work on numbers:
And these XPath functions work with Boolean values:
Youll see all these functions at work in this chapter, starting with the functions that are built into XSLT. This is not necessarily a chapter to read straight through, but rather to keep in mind as a referenceall the functions are here, ready to look up and put to work.