The behavior is more consistent now in the latest snapshot [1]: The default context item will be overwritten by an externally supplied value.
[1] https://files.basex.org/releases/latest/
On Tue, Nov 2, 2021 at 1:41 PM Christian Grün christian.gruen@gmail.com wrote:
Hi Hans-Jürgen,
If you assign an external context item on command line, there is no need for a context item declaration in the query prolog:
basex -I123 .
123
If a declaration exists with a default value, the bound context item is replaced by this default value.
This contrasts with the behavior of variable declarations, though, so I might check if we can align the behavior in one or the other way.
Schöne Grüße Christian
On Sun, Oct 31, 2021 at 10:47 AM Hans-Juergen Rennau hrennau@yahoo.de wrote:
Dear BaseX people,
probably a blackout of mine, but I do not understand the following behaviour. Query:
declare context item external := '#none'; .
When I call it, specifying a context item using -i or -I, I always get the default context item ('#none').
What do I overlook?
Kind regards, Hans-Jürgen