Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-4285

Imported Xquery modules will not resolve using classpath

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.8.0
    • 2.8.2, 2.9.0
    • camel-saxon
    • 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.

      Attachments

        1. camel-saxon.patch
          6 kB
          Jay mann

        Activity

          People

            davsclaus Claus Ibsen
            jmandawg Jay mann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: