Hi SukuMaran,

If both of your lib.xqy and default.xqy are in 
C:\mls-projects\xquery\helloworld, then you don't need to specify full path of 
lib.xqy in the import statement of your default.xqy. For example, this works:

Default.xqy:
=========
import module namespace lib = "http://marklogic.com/MLU/xqdt/examples"; at
   "\lib.xqy";

lib:user()
=======

I created an appserver with root C:\mls-projects\xquery\helloworld, kept both 
the files in the same directory, invoked default.xqy through the appserver and 
it worked.
You will find a good explanation of how paths of imported modules are resolved 
in MarkLogic documentation. Look for "Importing XQuery Modules, XSLT 
Stylesheets, and Resolving Paths"  in application developers guide.
Thanks,
Gajanan

From: [email protected] 
[mailto:[email protected]] On Behalf Of MaranSuku
Sent: Thursday, October 28, 2010 7:44 PM
To: [email protected]; [email protected]
Subject: [MarkLogic Dev General] Invalid Module Import path | XQDT Error

HI,

 I am getting the below error,
   XDMP-IMPORTPATH: Invalid Module Import path:
   C:\mls-projects\xquery\helloworld\lib.xqy    in /eval, on line 3
   I have created a libraray Module @
   C:\mls-projects\xquery\helloworld\lib.xqy

   lib.xqy
   ___module namespace lib = 'http://marklogic.com/MLU/xqdt/examples';
   declare function lib:user(){
   xdmp:get-current-user()
   };
   and when I am importing the function in Main Module, I am getting the
   Invalid Import path,

   default.xqy


  ___ import module namespace lib = "http://marklogic.com/MLU/xqdt/examples"; at
   "C:\mls-projects\xquery\helloworld\lib.xqy";

   lib:user()

   I am using Eclipse and the following are installed.

     Eclipse IDE for Java Developers    1.2.2.20100216-1730    epp.package.java
     MarkLogic XQDT Adapter Feature    0.7.0.v201001160647-17R-AkF7B77JBZFJF7
   org.eclipse.wst.xquery.marklogic.feature.feature.group
     XQuery Development Tools Feature    0.7.0.v201001121118-47Z-BgJ9E99OEhJOJ9
   org.eclipse.wst.xquery.feature.feature.group


--
Thanks,
SukuMaran
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to