Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.8.0
-
None
-
All
-
Patch Available
Description
When using an xquery endpoint that uses an xquery file like this:
<camel:to uri="xquery:com/test/xquery/manual.xq"/>
If the manual.xq file contains imported modules such as:
import module namespace utils = "myutils" at "classpath:/com/test/utils.xq";
they will not resolve relative to the classpath.
This is a big problem when using OSGI or any other situation where your Xquery files are inside your package/jar.
I've created a patch so that it will resolve the imports in the same way that the component resolves resources using resolveMandatoryResource.
I've tested the patch successfully using "classpath:/", "file://", and "http://" uri formats.