BaseX-Talk Digest, Vol 130, Issue 4
Friday, 4 February 2022 · 2 messages
RS
Rob Stapper4 Feb 2022 13:32 #
Hi Christian,
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? I would realy like to address every module-functions through a public variable even in a cyclic module-construction.
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?
Love to hear from you,
Rob Stapper
Quoted text · 60 lines
> Op 09-10-2020 12:00 schreef basex-talk-request at mailman.uni-konstanz.de: > > > Send BaseX-Talk mailing list submissions to > basex-talk at 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 at mailman.uni-konstanz.de > > You can reach the person managing the list at > basex-talk-owner at 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: > > 1. recursively used variables (Rob Stapper) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 8 Oct 2020 14:17:48 +0200 > From: Rob Stapper <r.stapper at lijbrandt.nl> > To: "basex-talk at mailman.uni-konstanz.de" > <basex-talk at mailman.uni-konstanz.de> > Subject: [basex-talk] recursively used variables > Message-ID: <48217f7a-0960-11eb-811f-00505699b758 at 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}test?. > 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 >
CG
Christian Grün4 Feb 2022 13:46 #
Hi Rob,
Quoted text · Rob Stapper · 1 line
> 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.
Quoted text · Rob Stapper · 1 line
> 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#DEFAULTDBQuoted text · Rob Stapper · 60 lines
> > Op 09-10-2020 12:00 schreef basex-talk-request at mailman.uni-konstanz.de: > > > > > > Send BaseX-Talk mailing list submissions to > > basex-talk at 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 at mailman.uni-konstanz.de > > > > You can reach the person managing the list at > > basex-talk-owner at 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: > > > > 1. recursively used variables (Rob Stapper) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Thu, 8 Oct 2020 14:17:48 +0200 > > From: Rob Stapper <r.stapper at lijbrandt.nl> > > To: "basex-talk at mailman.uni-konstanz.de" > > <basex-talk at mailman.uni-konstanz.de> > > Subject: [basex-talk] recursively used variables > > Message-ID: <48217f7a-0960-11eb-811f-00505699b758 at 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}test?. > > 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 > >
Written for BaseX 9.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery