A condition for the usability of this option is that there is a
possibility to pass arguments to the script.
Is that already possible in BaseX?

What kind of arguments would you like to set?

The easiest option may be to prefix your script string with some additional SET commands.