« Return to Thread: database modules

database modules

by Michael Sokolov-2 :: Rate this Message:

Reply to Author | View in Thread

When loading an xquery module from the database, you can do something like:

import module namespace
rc="http://www.ifactory.com/press/result-context" at
"xmldb:exist:///db/lrgdev/lib/result-context.xqy";


Now if result-context.xqy depends on another module (say kwic.xql),
which is also loaded in the database, in the same collection, the
relative import:

import module namespace kwic="http://exist-db.org/xquery/kwic" at
"kwic.xql";

should work, I think, but it attempts to load the module from the
filesystem and fails with an error like:

...
cannot read module source from file at kwic.xqy. Tried
/proj/exist/eXist/./kwic.xqy and /proj/exist/eXist/kwic.xqy
 ...
)

doesn't it seem as if the path ought to be relative to the including
module's path?

But whether that's true or not, is there any way to specify the include
without using an absolute path in the database (I want to be able to
have my code relocated to a new collection)?

Thanks

-Mike

------------------------------------------------------------------------------
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

 « Return to Thread: database modules