There are over 100 functions built into XQuery, covering a broad range of functionality. Functions can be used to manipulate strings and dates, perform mathematical calculations, combine sequences of elements, and perform many other useful jobs. You can also define your own functions, either in the query itself, or in an external library.
Both built-in and user-defined functions can be called from almost any place in a query. For instance, Example 1-9 calls the doc
function in a for
clause, and the data
function in an enclosed expression. Chapter 8 explains how to call functions and also describes how to write your own user-defined functions. Appendix A lists all of the built-in functions and explains each of them in detail.
3.147.60.63