Keyword arguments

In a static function call, arguments may be supplied either by position or by name. The call must have zero or more positional parameters followed by zero or more keyword parameters. For example:

sort(//employee, key := ->{@salary})

Although keywords will often be used for optional parameters as in this example, there is no rule requiring this. Whether a parameter is optional or required, the corresponding argument may be supplied either positionally or by keyword.

The use of keyword arguments to supply options in an options parameter declared with a map type (for example serialize($x, method:="xml", indent:=true())) is dropped in Saxon 12.

The draft specification allows keywords to be used in a partial function application (for example f(x := ?, y := ?)) but this is not currently implemented in Saxon.