Hi Christophe,
I can understand that compilation must be done on server-side - well, at least optimization - but client could parse the .xq file to check if there are imports, and either push them to server, or throw an error without accessing the server.
Raising errors sounds dangerous to me: I remember at least two use cases in which it was a deliberate choice to send XQuery code with module imports to a BaseX server. Moreover, besides module imports, there are numerous other expressions in a query module – such as the doc() function – which may be interpretedly differently on a client and on a server.
Is there an utility-tool which allows to generates a single script file from a .xq and included .xqm, that I could use before running basexclient ?
Maybe you can simply move all your library modules into the server-side BaseX repository. In this case, you won't need to specify the module location anymore [1].
Hope this helps, Christian
[1] http://docs.basex.org/wiki/Repository#Accessing_Modules
Best regards,
Christophe