[xquery-talk] Library Modules and URIs

Per Bothner per at bothner.com
Thu Sep 18 14:10:15 PDT 2003

McBeath, Darin W. (ELS) wrote:

> I was curious how everyone is using the URI field (string literal) to define
> a library module within xquery.  I have been considering the following
> approach (within Java) and would like some opinions from this group on the
> approach.

My plan is that Qexo would compile a Library Module to a Java class,
generating the Java class name from the StringLiteral,
probably using a "mangling" based on the one in JAXB.
Each function would be compiled to a static Java method, as well
as a static field whose value is a Procedure object that
describes the function.  (This is based on how Kawa compiles
modules written in the Scheme language to classes.)

When importing a module, I'd just ignore the 'at' clause.
(At least initially.  A later version might search for a jar
by the specified name.)  It would just map the namespace url to
a class name, and "load" that.

I hadn't planned on implementing modules for the next Kawa
release, but I guess I should just do it, given that most of
work is already done.
	--Per Bothner
per at bothner.com   http://per.bothner.com/

More information about the talk mailing list