fn:document, fn:function-available: default arguments #69
Labels
Editorial
Minor typos, wording clarifications, example fixes, etc.
PRG-easy
Categorized as "easy" at the Prague f2f, 2024
PRG-required
Categorized as "required for 4.0" at the Prague f2f, 2024
XSLT
An issue related to XSLT
This issue tracks the changes needed to the built-in functions to allow them to combine the declarations into a single definition with default parameter values.
The general approach to this is to make required arguments optional if they are for a function signature that is not the lowest argument count signature, and move any associated logic into the function.
fn:document
fn:document
/$base-node
fromnode()
tonode()?
.fn:function-available
fn:function-available
/$arity
fromxs:integer
toxs:integer?
.If $arity is the empty sequence, the function-available function returns true if and only if there is at least one available function (with some arity) whose name matches the value of the $name argument.
If $arity is not the empty sequence, the function-available function returns true if and only if there is an available function whose name matches the value of the $function-name argument and whose arity matches the value of the $arity argument.
The text was updated successfully, but these errors were encountered: