I think (can't swear to it) that should work automatically if the base URI of the query is a "jar:" URI (or pseudo-URI, since these aren't actually standardised). It would be interesting to see what calling static-base-uri() gives you.

Failing that, the answer is to write a module URI resolver which Saxon will call to get from the URI used in the "location hint" to an actual resource (file).

I'm afraid I have no personal experience of camel-saxon.

Michael Kay

On 28/07/2011 21:59, J- MAN wrote:
Hi all,

I'm trying to "import module" to import a module into my xquery file.  I'm using camel-saxon to startup a xquery endpoint:

<camel:to uri="xquery:com/com/test/xquery/books.xq"/>

Camel loads the initial xquery file from the classpath (the xquery files are inside the jar), the import inside books.xq looks like this:

import module namespace utils = "myutils" at "utils.xq";

unfortunately it does not know to look in the same directory inside the jar that the main xquery file was loaded from.  Is there anyway i can use the classpath on the import?  For example:

import module namespace utils = "myutils" at "classpath:/com/test/xquery/utils.xq";

How would i import an xquery file that lives inside the jar?  

------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help