Re: multiple modules with same namespace

Mary Holstege wrote:

 > The XML Query Working Group considered your comment and has decided
 > not to  make the specific changes you request.

Well, some changes need to be made - the most recent public drafts (at
least) are a mess of contradictions in this area.

> URI resolution is inherently implementation-specific. There is no guarantee
> that http://www.example.com/foo.xqy is going to open a connection to the
> example.com HTTP daemon listening on port 80; neither is the use of the  
> file
> URI file://opt/exampleServer/modules/foo.xqy a guarantee that any  
> particular
> file on the file system will be opened. However tempting it may be to  
> require
> the location URIs, or specify how they are to be dereferenced if present,
> we consider that inappropriate to impose those kinds of constraints on URI
> resolvers and XQuery implementations.

I have not suggested any such constraint.  All I'm saying is that
a module should have a unique name so it is possible to distinuish
one module from another.  If a module does not have a name, the
semantics, the implementation, and usage become much more awkward.

The Feb '04 formal semantics assumes a unique name - see below.

> We further note that enforcing a logical/physical mapping, even in a
> non-normative appendix, still would not address examples such as:
> 
>     import module "A"
> 
> which is not going to produce a portable result without requiring
> some sort of configuration work on the part of the porter in any case.

In the Nov '03 (most recent public) draft, "A" is a URI - which implies
again that a module is identified by a URI.

It's not just a question of deployment.  What does 'import module "A"'
*mean* if there are multiple modules in namespace "A"?

XQuery will need "deployment standardization" if it is to be used
for non-trivial XQuery application, just like JSP has.  I can understand
you wanting to put this off until a future standard, but I'm not sure
I see much point of a standard module system if the standard leaves such
issues implementation-defined.

> We appreciate your feedback on the XML Query specifications. Please let us
> know if this response is satisfactory. If not, please respond to this
> message, explaining your concerns.

It is not satisfactory, unless the formal semantics has been changed.
It assumes there is a one-to-one mapping from URI to module.  See:

http://lists.w3.org/Archives/Public/public-qt-comments/2004Mar/0013.html

   A related issue is that the the formal semantics "looks up" variables
   and functions in imported modules by [looking up] their namespace
   uri in the "module_dynEnv".  Note this doesn't work if there are
   multiple modules in the same namespace.  Both formal and informal
   semantics are very unclear about the difference between a library
   module as a syntactic unit, its namespace, and the result of
   elaborating one or more libray module syntax forms with the same uri.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

Received on Thursday, 24 June 2004 15:06:47 UTC