Hi Hans-Jürgen, > question: what is the recommended way of ensuring that an application calling BaseX via command-line (basex ...) uses a certain strip whitespace mode (true or false), if the application is deployed on servers with different BaseX versions? Option -w cannot naively be used, as it toggles the strip whitespace mode, so the effect depends on the version.
Sounds challenging. You can set the STRIPWS option to an explicit value… basex -c"SET STRIPWS false" query.xq ... …but this will fail as the comparable BaseX 9 option was called CHOP. You could use XQuery to retrieve the version number… data(db:system()//version) …or to check if a specific option is supported: try { prof:void(db:option('chop')), '!' } catch * { '?' } In general, I would recommend updating to the latest version whenever possible… Hope this helps, Christian