Menu

#12 Module importation doesn't work

closed-fixed
nobody
None
5
2011-04-25
2010-04-18
Anonymous
No

Hello,
I think that module importation is broken. When importing a library module that defines functions, the query parser apparently doesn't import the target namespace, and consequently fails to register the imported functions into the main modules's context.

Example:

(: module libmod.xq :)
module namespace libmod = "libmod" ;

declare function libmod:hello() as element() {
<hello>world</hello>
} ;

(: module mainmod.xq :)
import module namespace libmod = "libmod" at "libmod.xquery" ;

libmod:hello()

Trying to run mainmod.xq fails, complaining that the libmod prefix is in an unallocated namespace.

Any help would be greatly appreciated :-)

Discussion

  • Nobody/Anonymous

    Correction: the bug only appears when using the XQJ interface

     
  • Peter M. Fischer

    Was already fixed in SVN trunk, added a test case in SVN revision 4287

     
  • Peter M. Fischer

    • status: open --> closed-fixed
     

Log in to post a comment.