Skip to content

Commit

Permalink
867 Add an explanation of default value expressions in function signa…
Browse files Browse the repository at this point in the history
…tures.
  • Loading branch information
michaelhkay committed Dec 4, 2023
1 parent 544383a commit d6f4f59
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion specifications/xpath-functions-40/src/xpath-functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,14 @@ for transition to Proposed Recommendation. </p>'>
as a keyword in a function call)</p></item>
<item><p>The static type of the parameter (in italics)</p></item>
<item><p>If the parameter is optional, then an expression giving the default value
(preceded by the symbol <code>:=</code>).</p></item>
(preceded by the symbol <code>:=</code>).</p>
<p diff="add" at="2023-12-04">The default value expression is evaluated using the static and
dynamic context of the function caller (or of a named function reference). For example,
if the default value is given as <code>.</code>, then it evaluates to the context value
from the dynamic context of the function caller; if it is given as <code>default-collation</code>,
then its value is the default collation from the static context of the function caller;
if it is given as <code>deep-equal#2</code>, then the third argument supplied to <code>deep-equal</code>
is the default collation from the static context of the caller.</p></item>
</ulist>
<p>If there are two or more parameter declarations, they are separated by a comma.</p>
<p>The <emph> <code>return-type</code></emph>, also in italics, specifies the static type of the value returned by the
Expand Down

0 comments on commit d6f4f59

Please sign in to comment.