multiple modules with same namespace

I asked this before, but even the latest drafts don't seem to have
a clear answer for whether there can be multiple library modules
with the same namespace.

Assume mod1.xql:

module namespace m = "M";
declare function m:f() { 1 }

and mod2.xql:

module namespace m = "M";
declare function m:g() { 2 }

Is the following main module allowed?

import module namespace m1 = "M" at "mod1.xql";
import module namespace m2 = "M" at "mod2.xql";
m1:f()+m2:g()

How about this?

import module namespace m = "M";
m:f()+m:g()

The statement in 4.7 that "The module import identifies the module
to be imported by its target namespace" implies neither are allowed
because in this case you cannot identify the module by its target
namespace.  But phrasing is sufficiently imprecise that I can't be
sure what's intended.

It would be nice to clarify this, either:
A. The target namespace must match a single library module; it is
a static error if multiple modules have the same namespace.
or:
B. If multiple modules match the target namespace, then they
are all imported.

My assumption (and strong recommendation) is that A is intended.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

Received on Wednesday, 31 December 2003 17:49:41 UTC