Additional info on the invoke problem
I am not sure if this tells more of the problem (xquery:invoke does not open the collection), but: if the query does something with the collection plus predicates retrieved, the query is evaluated. So, in my example
collection('suuryritys_com/suuryritys.com/data/ou')//*[@cat='production']
if I add some extra content that forces the evaluation, like
<a>{collection('suuryritys_com/suuryritys.com/data/ou')//*[@cat='production']}</a>/*I.e. add the result to a -element and retrieve it, the xquery:invoke("file-name.xq") evaluates the query, even if the database (suuryritys_com) is closed!
Hi Arto,
thanks for your report. Could you provide us with a self-contained example that allows us to reproduce the problem?
Christian
Quoted text · Arto Viitanen · 26 lines
On Thu, Feb 21, 2013 at 9:03 AM, Arto Viitanen <arto.viitanen at microteam.fi> wrote: > I am not sure if this tells more of the problem (xquery:invoke does not open > the collection), but: if the query does something with the collection plus > predicates retrieved, the query is evaluated. So, in my example > > collection('suuryritys_com/suuryritys.com/data/ou')//*[@cat='production'] > > if I add some extra content that forces the evaluation, like > > <a>{collection('suuryritys_com/suuryritys.com/data/ou')//*[@cat='production']}</a>/* > > I.e. add the result to a -element and retrieve it, the > xquery:invoke("file-name.xq") evaluates the query, even if the database > (suuryritys_com) is closed! > > -- > Arto Viitanen > Microteam Oy > Finland > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
Hi Arto,
thanks for the test case. The bug has been fixed; please check out the latest stable snapshot [1].
Best, Christian
Quoted text · Christian Grün · 11 lines
25.2.2013 20:13, Christian Grün wrote: > Hi Arto, > > thanks for the test case. The bug has been fixed; please check out the > latest stable snapshot [1]. > > Best, > Christian > > [1] http://files.basex.org/releases/latest/ >
Thank you Christian, the snapshot works!
Written for BaseX 7.6. BaseX may have changed since: please check the current documentation.