Optional parameters

Function declarations in XSLT and XQuery can include optional parameters with a default value.

If a parameter is optional, then all subsequent parameters must also be optional.

If two functions in a query or stylesheet have the same name, then they must have non-overlapping arity ranges. The arity range indicates the number of arguments that must be supplied in a call to the function: the minimum is the number of required parameters, the maximum is the number of required parameters plus optional parameters.