Runtime load of a module?

Sunday, 17 May 2020 · 5 messages · last reply 19 May 2020
BK
Buddy Kresge17 May 2020 16:46 #
We have a situation where we have certain XQuery modules and we want to know if there is a way to load a module into BaseX at Run-time? As a hypothetical example If (some condition) Load module X into Basex else Load module Y into Basex
MH
Martin Honnen17 May 2020 16:52 #
Quoted text · Buddy Kresge · 3 lines
Am 17.05.2020 um 16:46 schrieb Buddy Kresge: > We have a situation where we have certain XQuery modules and we want to > know if there is a way to load a module into BaseX at Run-time?
https://docs.basex.org/wiki/XQuery_Module#xquery:parse-uri seems to allow that. The W3C library also defines https://www.w3.org/TR/xpath-functions/#func-load-xquery-module but I don't think BaseX supports that.
BK
Buddy Kresge17 May 2020 20:23 #
Can’t tell if that parse-uri will then put things into the context such that a call to inspect:context() will return the functions loaded? Trying to run an interactive example with GUI, so maybe I’m doing something wrong? Buddy Kresge buddy.kresge at known2u.com o: 860-800-6677 ext: 501 m: 860-986-4830
Quoted text · BaseX-Talk · 12 lines
From: BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> on behalf of Martin Honnen <martin.honnen at gmx.de> Sent: Sunday, May 17, 2020 10:52:52 AM To: basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] Runtime load of a module? Am 17.05.2020 um 16:46 schrieb Buddy Kresge: > We have a situation where we have certain XQuery modules and we want to > know if there is a way to load a module into BaseX at Run-time? https://docs.basex.org/wiki/XQuery_Module#xquery:parse-uri seems to allow that. The W3C library also defines https://www.w3.org/TR/xpath-functions/#func-load-xquery-module but I don't think BaseX supports that.
CG
Christian Grün17 May 2020 21:09 #
Hi Buddy, inspect:functions should help you out [1]; it’s similar to fn:load-xquery-module (which – Martin is right – is not available yet in BaseX). Hope this helps Christian PS: Please be patient, I’ll be offline most of next week. [1] https://docs.basex.org/wiki/Inspection_Module#inspect:functions
Quoted text · Buddy Kresge · 30 lines
Buddy Kresge <buddy.kresge at known2u.com> schrieb am So., 17. Mai 2020, 20:23: > Can’t tell if that parse-uri will then put things into the context such > that a call to inspect:context() will return the functions loaded? Trying > to run an interactive example with GUI, so maybe I’m doing something wrong? > > Buddy Kresge > buddy.kresge at known2u.com > o: 860-800-6677 ext: 501 > m: 860-986-4830 > ------------------------------ > *From:* BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> on behalf > of Martin Honnen <martin.honnen at gmx.de> > *Sent:* Sunday, May 17, 2020 10:52:52 AM > *To:* basex-talk at mailman.uni-konstanz.de < > basex-talk at mailman.uni-konstanz.de> > *Subject:* Re: [basex-talk] Runtime load of a module? > > Am 17.05.2020 um 16:46 schrieb Buddy Kresge: > > We have a situation where we have certain XQuery modules and we want to > > know if there is a way to load a module into BaseX at Run-time? > > https://docs.basex.org/wiki/XQuery_Module#xquery:parse-uri seems to > allow that. > > > The W3C library also defines > https://www.w3.org/TR/xpath-functions/#func-load-xquery-module but I > don't think BaseX supports that. > >
BK
Buddy Kresge19 May 2020 20:22 #
If I do an “inspect:functions”, those functions though are not available/seen if I do a subsequent call to inspect:context(), correct? Buddy Kresge buddy.kresge at known2u.com<mailto:buddy.kresge at known2u.com> o: 860-800-6677 ext: 501 c: 860-986-4830
Quoted text · Christian Grün · 29 lines
From: Christian Grün <christian.gruen at gmail.com> Sent: Sunday, May 17, 2020 3:09 PM To: Buddy Kresge <buddy.kresge at known2u.com> Cc: Martin Honnen <martin.honnen at gmx.de>; BaseX <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] Runtime load of a module? Hi Buddy, inspect:functions should help you out [1]; it’s similar to fn:load-xquery-module (which – Martin is right – is not available yet in BaseX). Hope this helps Christian PS: Please be patient, I’ll be offline most of next week. [1] https://docs.basex.org/wiki/Inspection_Module#inspect:functions Buddy Kresge <buddy.kresge at known2u.com<mailto:buddy.kresge at known2u.com>> schrieb am So., 17. Mai 2020, 20:23: Can’t tell if that parse-uri will then put things into the context such that a call to inspect:context() will return the functions loaded? Trying to run an interactive example with GUI, so maybe I’m doing something wrong? Buddy Kresge buddy.kresge at known2u.com<mailto:buddy.kresge at known2u.com> o: 860-800-6677 ext: 501 m: 860-986-4830 From: BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de<mailto:basex-talk-bounces at mailman.uni-konstanz.de>> on behalf of Martin Honnen <martin.honnen at gmx.de<mailto:martin.honnen at gmx.de>> Sent: Sunday, May 17, 2020 10:52:52 AM To: basex-talk at mailman.uni-konstanz.de<mailto:basex-talk at mailman.uni-konstanz.de> <basex-talk at mailman.uni-konstanz.de<mailto:basex-talk at mailman.uni-konstanz.de>> Subject: Re: [basex-talk] Runtime load of a module? Am 17.05.2020 um 16:46 schrieb Buddy Kresge: > We have a situation where we have certain XQuery modules and we want to > know if there is a way to load a module into BaseX at Run-time? https://docs.basex.org/wiki/XQuery_Module#xquery:parse-uri seems to allow that. The W3C library also defines https://www.w3.org/TR/xpath-functions/#func-load-xquery-module but I don't think BaseX supports that.

⚡Generated with XQuery