Hi Jean-Philippe, thanks for your mail. Your code seems to work properly when using plain XQuery, so I assume the problem is related to RESTXQ. We'll have a closer look at that.
Best, Christian ___________________________ 2013/6/18 Jean-philippe Magué <[email protected]>: > Hi, > > I'm having problem with modules importing each other. I have the two > following restxq modules : > > moduleA.xqm > ------------------ > module namespace moduleA = 'http:/www.example.com/moduleA'; > > import module namespace moduleB = 'http:/www.example.com/moduleB' at > 'moduleB.xqm'; > > declare function moduleA:f() { > "" > }; > ------------------ > > > > moduleB.xqm > ------------------ > module namespace moduleB = 'http:/www.example.com/moduleB'; > > import module namespace moduleA = 'http:/www.example.com/moduleA' at > 'moduleA.xqm'; > ------------------ > > They fail to compile with the following error: > > Stopped at line 7, column 29 in > /Users/jmague/work/basex/webapp/restxq/moduleA.xqm: > [XQST0034] Duplicate declaration of function moduleA:f(...). > > Are cross imports just forbidden ? Yet, the XQuery specification state that > (section 4.12.4 Cycles) : "Implementations must resolve cycles in the import > graph, either at the level of module URIs or at the level of location URIs, > and ensure that each module is imported only once." > > > Best, > > Jean-Philippe > > > -- > Jean-Philippe Magué > Maître de Conférences en Humanités Numériques > Responsable de l'Atelier des Humanités Numériques : ahn.ens-lyon.fr > Ecole Normale Supérieure de Lyon > +33 (0)4 26 23 38 08 > > -- > > "Using computers will therefore lead us to a more profound and systematic > knowledge of human expression; in principle, it can help us to be more > humanistic than before." > Busa, 1980. > > _______________________________________________ > BaseX-Talk mailing list > [email protected] > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > _______________________________________________ BaseX-Talk mailing list [email protected] https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

