I have few module namespace xquery files which were used in multiple files. I want to have the namespaces in one common xquery file and import that file whereever I want to use.
Say for example,
I have process-lib.xqy
, util-lib.xqy
and query-lib.xqy
.
I used to import these in multiple files like following,
import module namespace util = "util" at "util-lib.xqy";
import module namespace process = "process" at "process-lib.xqy";
import module namespace query = "query" at "query-lib.xqy";
Now I tried to use them in one common file named as common-import.xqy
and import this file in multiple files.
when I tried this approach,
import module namespace common-import= "common-import" at "common-import.xqy";
It throws exception as prefix util has no namespace binding
.
How to achieve this?