Hi Andreas,

This is in compliance with the rules of the specification [1]. In the BaseX-specific functions, we raise errors; maybe this is the other case you mentioned?

Christian

[1] https://www.w3.org/TR/xpath-functions-31/#option-parameter-conventions



Andreas Mixich <mixich.andreas@gmail.com> schrieb am So., 21. Apr. 2019, 04:55:
Given:

let $d1 := map {"key1":"value1"}
let $d2 := map {"key2":"value2"}
return map:merge($d1, $d2)

where the two maps to be merged should have been included as sequence, but were, mistakenly, not, the function should return an error, since the second map gets evaluated as $options, but none of the $options are to be found inside.

It seems, that only a type-check is done, to assure valid $options, since, in another case, I got a [XPTY0004].

--
Minden jót, all the best, Alles Gute,
Andreas Mixich