[xquery-talk] Library Modules and URIs

Michael Kay mhk at mhk.me.uk
Thu Sep 18 17:35:56 PDT 2003


I think some people are thinking in terms of having a fairly close
association between the namespace used for a set of elements and
attributes, and a module that contains functions applicable to those
elements.

Michael Kay

> -----Original Message-----
> From: talk-bounces at xquery.com 
> [mailto:talk-bounces at xquery.com] On Behalf Of McBeath, Darin W. (ELS)
> Sent: 18 September 2003 01:48
> To: 'talk at xquery.com'
> Subject: [xquery-talk] Library Modules and URIs
> 
> 
> 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.
> 
> The approach centers around using a Java packaging scheme 
> style as the URI for a library module.  For example, I could 
> place a group of utility functions within a library module 
> with a URI of "com.elsevier.xquery.functions.util".  The 
> XQuery engine would conceivably either directly map this URI 
> to the physical location of the library module (would not 
> require the "at location" when importing the module) or else 
> it would provide a base path for the location of library 
> modules (via some form of configuration option) and would 
> require the "at location" when importing the module.  If the 
> latter approach is used, the URI described above could easily 
> become the path (by replacing the '.' with '/') appending to 
> the base path for locating the library module.
> 
> One could then easily author a 'wrapper' object which accepts 
> the  URI for the library module contianing the needed 
> function, function name, and array of parms to then invoke 
> the function.  This nicely separates the XQuery code from the 
> Java code.  This also allows a Java style of packaging for 
> XQuery functions.
> 
> In any case, I would be curious to anyones thoughts on this 
> approach. _______________________________________________
> talk at xquery.com
> http://www.x-query.com/mailman/listinfo/talk
> 



More information about the talk mailing list