Moving our xquery modules into server repository isn't a solution, as we could have many releases of the same module, used on various databases.
So the solution will be to build a single .xq file with all the code in.
I'm going to write a maven plugin to do this. Is there some basex code I could use to help me ? Entries will help !
Thanks in advance,
Christophe
Le 2015-07-22 15:08, Christian Grün a écrit :
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