Hi Fabrice,
In order to allow for parameters, do you think one could declare external variables before the commands element ? Is it to say that a command file could be any xquery script generateding xml ?
Exactly; your command file will be evaluated the same as any other XQuery expression.
The main challenge will be to detect if the command script contains command strings or an XQuery expression. In some cases, there is no unique way to do that. For example, the following script...
"info"
is both a valid BaseX command and an XQuery expression. Currently, the input is evaluated as XML command script when the input starts with "<".
Cheers, Christian