Functions operate on and return the four fundamental XPath data types.
Some functions take variable numbers of arguments.
A function that doesn’t have any arguments normally operates on the context node.
Most functions are weakly typed. You can pass any of the four types in the place of an argument that is declared to be of type boolean, number, or string. XPath will convert it and use it. The exceptions are those functions that are declared to take node-sets as arguments. XPath cannot convert arguments of other types to node-sets.
Functions do not modify their arguments in anyway.