开发者

MarkLogic: Loading (import) XQuery Modules from database

开发者 https://www.devze.com 2023-04-06 17:11 出处:网络
I want to load a module which is stored in a database under the modules named as \"/modules/mylib.xqy\".

I want to load a module which is stored in a database under the modules named as "/modules/mylib.xqy".

Currently, in the document requiring these module, I am writing

import module namespace rb2lib="http://example.com/modules/lib" at "/modules/mylib.xqy";开发者_高级运维

Unfortunately, this expression makes a lookup on the filesystem and not on my database. Is there a way loading modules stored in database?

Thanks in advance!


Yes, change the application server configuration's modules setting from (file system) to the Modules database (or any database). The XQuery module must be stored in that database, and its URI must be the app server's module root plus the import location. For example, you could set your module root to / and store the module at /modules/mylib.xqy.


This is controlled by a setting on the administrative console. Look at your App Server configuration for the "modules" config item. It is currently set to file system, right? Change it to the database that has your modules.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号