Unable to import module on eXist server

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
odaata
Posts: 26
Joined: Wed Apr 10, 2013 12:34 pm
Location: Utrecht, Netherlands

Unable to import module on eXist server

Post by odaata » Wed Apr 10, 2013 12:57 pm

Hi,

I'm using Oxygen to write XQuery 3.0 that is executed on an eXist 2.0 server. Everything works fine except I am unable to import other modules in my code.

Code: Select all

import module namespace example="http://example.com/xquery/example" at "example.xqm";
No matter what path I give it, I always get the error below (with a different location hint):

Code: Select all

err:XQST0059 error found while loading module moduleName: Source for module 'http://example.com/xquery/example' not found module location hint URI 'example.xqm.
I've tried the suggestions given here: http://www.oxygenxml.com/forum/post5147.html#p5147

But none of them have worked. I've tried the following:
  • relative path (since the module is in the same directory): "example.xqm"
  • "/db/modules/example.xqm"
  • "xmldb:exist///db/modules/example.xqm"
  • "xmldb:exist//localhost:8080/db/modules/example.xqm"
  • "xmldb:exist//user:pass@localhost:8080/db/modules/example.xqm"
  • "http://localhost:8080/exist/rest/db/modules/example.xqm"
The other oddity here is that the Outline view is able to load the module, because it shows all the variables and functions in imported modules and the intellisense typing works with imported modules, but when I try to execute it using the same data source that I'm using to edit it, I get the error above. Can anyone help me with this?

Thanks,
Mike
Cheers,
M

adrian
Posts: 2573
Joined: Tue May 17, 2005 4:01 pm

Re: Unable to import module on eXist server

Post by adrian » Thu Apr 11, 2013 3:22 pm

Hello,

Unfortunately this doesn't work with Oxygen v14.2 and older.
There's another topic on the forum that discusses this:
XQuery Validation problem with imported modules

However, we already have a solution for this in the current development stream (for Oxygen v15.0). If you are interested in testing a beta version of Oxygen that includes this, please write to our support email address: support AT oxygenxml DOT com

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

odaata
Posts: 26
Joined: Wed Apr 10, 2013 12:34 pm
Location: Utrecht, Netherlands

Re: Unable to import module on eXist server

Post by odaata » Thu Apr 11, 2013 3:34 pm

Ok, thanks for the info. I sent support an e-mail to try out version 15 beta. This one feature will make my life so much easier when writing XQuery...

Cheers,
Mike
Cheers,
M

odaata
Posts: 26
Joined: Wed Apr 10, 2013 12:34 pm
Location: Utrecht, Netherlands

Re: Unable to import module on eXist server

Post by odaata » Fri Apr 12, 2013 6:04 pm

I tried out version 15 beta on Ubuntu and I can confirm that is now working! It validates and properly executes XQueries with imported modules on an eXist 2.0 server.

Thanks for your help!
Cheers,
M

stdu
Posts: 81
Joined: Mon Mar 05, 2012 5:23 pm

Re: Unable to import module on eXist server

Post by stdu » Mon May 05, 2014 11:25 am

Hi,

I still have this issue in Oxygen Editor 15.2: the module is loaded, because Oxygen offers me all variables and functions from the module by writing new code, but the the validation still fails (with the mentionend error notice). Have I configure something else?

Thx & Greets,
Stefan

adrian
Posts: 2573
Joined: Tue May 17, 2005 4:01 pm

Re: Unable to import module on eXist server

Post by adrian » Mon May 05, 2014 12:39 pm

Hello Stefan,

What version of eXist are you using?
Did you configure a native eXist data source and connection (or used the Create eXist-db XML connection dialog) in Oxygen or are you using a generic WebDAV connection to access eXist?

Note that the eXist validation only works with resources opened from a native eXist connection.
If the problem persists, please let me know what does the 'import module' line look like.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Post Reply