Hi Dimitar,
However, you may find that using the packaging API [1] is a much more convenient way of managing XQuery module libraries.
This is just a simple xq file with four functions, me being the only user. I don't really want to learn a whole new API and whatnot to get it imported.
The relevant code seems to be in QueryParser.io: IO fl = IO.get(fn); // if file does not exist, try base uri if(!fl.exists()) { final IO base = ctx.base(); if(base != null) fl = base.merge(fn); } // if file does not exist, try query directory if(!fl.exists() && file != null) fl = file.merge(fn); However, both ctx.base() and file are null for the query run though /rest?run=name.xq, so it does not find the other file.
Kind regards, Ralf