Hi Rob,
Referring to an old issue of 10-10-2020. Is there any change the solution to the issue as mentioned below is part BaseX 10?
It’s still open, sorry (see [1] and comments). I guess I’d need 2, 3 days off to make this really robust.
Another point that I would very much be concidered is that the "at"-clause of the import-command could also handle database locations. I would like my functionality to be stored as close as possible to its relevant dataStructures. Is that something tat cn be considered?
As databases are only opened at compile and/or evaluation time, it won’t be possible to refer to database resources at parse time as long as we want to provide database-wide transactions.
Some time ago, we’ve introduced an option to restrict fn:doc/fn:collection calls to a globally opened database [2]. We could develop this concept further and restrict all other BaseX operations to a single database. That would be a long way, though, as one of the main characteristics of BaseX is exactly to allow the access to multiple databases via a single XQuery – and we’d still need to clarify what happens if e.g. a query with imported database resources is parsed, but not evaluated yet, and if another query wants to update this resource at the same time. The same could certainly happen with files and directories, but we haven’t extended the transaction concept to local resources (and we won’t do so in future).
Best, Christian
[1] https://github.com/BaseXdb/basex/issues/1095 [2] https://docs.basex.org/wiki/Options#DEFAULTDB
Op 09-10-2020 12:00 schreef basex-talk-request@mailman.uni-konstanz.de:
Send BaseX-Talk mailing list submissions to basex-talk@mailman.uni-konstanz.de
To subscribe or unsubscribe via the World Wide Web, visit https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk or, via email, send a message with subject or body 'help' to basex-talk-request@mailman.uni-konstanz.de
You can reach the person managing the list at basex-talk-owner@mailman.uni-konstanz.de
When replying, please edit your Subject line so it is more specific than "Re: Contents of BaseX-Talk digest..."
Today's Topics:
- recursively used variables (Rob Stapper)
Message: 1 Date: Thu, 8 Oct 2020 14:17:48 +0200 From: Rob Stapper r.stapper@lijbrandt.nl To: "basex-talk@mailman.uni-konstanz.de" basex-talk@mailman.uni-konstanz.de Subject: [basex-talk] recursively used variables Message-ID: 48217f7a-0960-11eb-811f-00505699b758@smtp.kpnmail.nl Content-Type: text/plain; charset="utf-8"
Hi,
The code[1] below and send as attachment generates a error message: ?Static variable depends on itself: $Q{http://www.w3.org/2005/xquery-local-functions%7Dtest?. I use these variables to refer to my private functions in my modules so I can easyly refer to them in a inheritance situation. It?s not a big problem for me but I was wondering if the error-triggering is justified or that it should work.
[1]=========================================== declare variable $local:test := local:test#1 ; declare %private function local:test( $i) { if ( $i > 0) then $local:test( $i - 1) } ;
$local:test( 10)
Kind regards,
Rob Stapper
Sent from Mail for Windows 10
-- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus