BaseXdb/basex — Issue #402: Modules: check correctness of repeated (re)declarations
Author: ChristianGruen
Created: 2012-02-26 15:28:45+00:00
State: open
Labels: bug, XQuery

=== expath-pkg.xml

Namespace Trouble Test

http://dyfis.net/example/ns-test/foo
foo.xq

http://dyfis.net/example/ns-test/bar
bar.xq

=== ns-test/foo.xq
module namespace foo = "http://dyfis.net/example/ns-test/foo";

declare function foo:test() {
1 + 1
};
=== ns-test/bar.xq
module namespace bar = "http://dyfis.net/example/ns-test/bar";

declare function bar:test() {
1 + 1
};
=== ...in the basex-gui buffer...
import module namespace foo="http://dyfis.net/example/ns-test/foo";
import module namespace bar="http://dyfis.net/example/ns-test/bar";
1+1
=== ...results in...
Error: [XQST0047] Module is declared twice: 'http://dyfis.net/example/ns-test/bar'.