I want to verify the following:
* I've made a module that contains an import statement in its own
namespace. This import references another file, the idea being that the
source code of the module is spread over two files.
* No complaints from the compiler
* I can reference a function in the imported module part from the code
in the importing part,
* but I cannot reference a function defined in the imported module in a
query that imports just the importing module.
So, more schematically:
A imports B, both files have the same namespace declaration n
n:foo is defined in A and calls n:bar, defined in B
A query that imports A can call n:foo and execution will be as expected.
However, in that same query, a call to n:bar goes wrong.
Is that the correct behaviour as implemented in eXist? It seems that
implementations have some freedom in interpreting this situation. The
XQuery specification says:
"A module may import its own target namespace (this is interpreted as
importing an implementation-defined set of other modules that share its
target namespace.) However, it is a static error [err:XQST0073] if the
graph of module imports contains a cycle (that is, if there exists a
sequence of modules M1 ... Mn such that each Mi imports Mi+1 and Mn
imports M1), unless all the modules in the cycle share a common
Get latest updates about Open Source Projects, Conferences and News.