Howdy -- please see the following example:
=== expath-pkg.xml <?xml version="1.0"?> <package xmlns="http://expath.org/ns/pkg" spec="1.0" name=" http://dyfis.net/example/ns-test" abbrev="ns-test" version="0.1.136892+build.20120224.105428"> <title>Namespace Trouble Test</title> <xquery> <namespace>http://dyfis.net/example/ns-test/foo</namespace> <file>foo.xq</file> </xquery> <xquery> <namespace>http://dyfis.net/example/ns-test/bar</namespace> <file>bar.xq</file> </xquery> </package> === 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'.