Commit 9f1cb270 authored by Wolfgang's avatar Wolfgang

Avoid syntax errors when passing empty optional parameter

parent 9bdc212b
......@@ -595,11 +595,12 @@ declare %private function pm:optional-parameters($signature as element(function)
let $optional :=
for $param in $params
let $mapped := $functionArgs[@var = $param/@name]
let $value := if ($param/@value) then $param/@value else '()'
return
if ($mapped) then
()
else
``["`{$param/@name}`": `{$param/@value}`]``
``["`{$param/@name}`": `{$value}`]``
return
<param>map {{{string-join($optional, ", ")}}}</param>
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment