Hi Fabrice,
Nice tip, I can see this working.
Thanks.
From: Etanchaud Fabrice [mailto:Fabrice.Etanchaud@horanet.com]
Sent: 30 October 2015 14:39
To: Hondros, Constantine (ELS-AMS); 'basex-talk@mailman.uni-konstanz.de'
Subject: RE: [basex-talk] Best way to batch up a set of DB creates, updates and queries?
My fault,
I missed the final step :
You have to execute the resulting xml.
declare variable $my-option as xs:string external;
declare variable $my-value as xs:string external;
file:write(‘myScript.bxs’,
….
<commands>
<set option=”{$my-option}”>{$my-value}</set>
…
</commands>)
And then, in the GUI, load the bxs file and run it.
If there is a server running, you could try to client:execute() the resulting xml.
I did not find a xquery function that allow you to run a batch.
Best regards,
Fabrice
De : Hondros, Constantine (ELS-AMS) [mailto:C.Hondros@elsevier.com]
Envoyé : vendredi 30 octobre 2015 14:07
À : Etanchaud Fabrice <Fabrice.Etanchaud@horanet.com>; 'basex-talk@mailman.uni-konstanz.de' <basex-talk@mailman.uni-konstanz.de>
Objet : RE: [basex-talk] Best way to batch up a set of DB creates, updates and queries?
Hello Fabrice,
Thanks, but I’m struggling to understand your example – you’ve got a mixture of xquery and Basex script syntax. Can you give me a slightly larger snippet, as I don’t see how this can work.
Thanks!
From: Etanchaud Fabrice [mailto:Fabrice.Etanchaud@horanet.com]
Sent: 30 October 2015 12:38
To: Hondros, Constantine (ELS-AMS); 'basex-talk@mailman.uni-konstanz.de'
Subject: RE: [basex-talk] Best way to batch up a set of DB creates, updates and queries?
Hello Constantine,
Facing the same problem, as commands can be written in xml,
I found the following solution useful (as usual thank you Christian), to inject configuration where needed :
Declare variable $my-option as xs:string external;
Declare variable $my-value as xs:string external;
….
<commands>
<set name=”{$my-option}”>{$my-value}</set>
…
</commands>
Best regards,
Fabrice
Horanet Smart Objects
F-85200 Fontenay-le-Comte
De :
basex-talk-bounces@mailman.uni-konstanz.de [mailto:basex-talk-bounces@mailman.uni-konstanz.de]
De la part de Hondros, Constantine (ELS-AMS)
Envoyé : vendredi 30 octobre 2015 10:34
À : 'basex-talk@mailman.uni-konstanz.de' <basex-talk@mailman.uni-konstanz.de>
Objet : Re: [basex-talk] Best way to batch up a set of DB creates, updates and queries?
Please let me also clarify, I’m looking for a solution that can be run from the GUI – so I’m not looking for suggestions using shell scripts or Ant which would be easy to implement.
Thanks,
C.
From:
basex-talk-bounces@mailman.uni-konstanz.de [mailto:basex-talk-bounces@mailman.uni-konstanz.de]
On Behalf Of Hondros, Constantine (ELS-AMS)
Sent: 29 October 2015 18:12
To: 'basex-talk@mailman.uni-konstanz.de'
Subject: [basex-talk] Best way to batch up a set of DB creates, updates and queries?
I’m looking for the best way to batch up a series of updating operations into a single pipeline that can be run at once.
To give you an idea, we have to create multiple databases, perform a number of updating post-processes on each, before finally pulling certain fields out.
I’ve got a lot of parameters that need to externalised somehow – database creation options, location of DTDs, XSDs, Catalogs, and unless I am trying this the wrong way I am finding it quite difficult.
I can’t write it all XQuery – I have a mixture of updating and non-updating functions.
I can’t get much traction out of the BXS scripting syntax – for example, I can’t seem to create and use variables using this.
What do other people out there use to glue these sorts of operations together?
TIA,
Constantine
Elsevier B.V. Registered Office: Radarweg 29, 1043 NX Amsterdam, The Netherlands, Registration No. 33156677, Registered in The Netherlands.
Elsevier B.V. Registered Office: Radarweg 29, 1043 NX Amsterdam, The Netherlands, Registration No. 33156677, Registered in The Netherlands.
Elsevier B.V. Registered Office: Radarweg 29, 1043 NX Amsterdam, The Netherlands, Registration No. 33156677, Registered in The Netherlands.
Elsevier B.V. Registered Office: Radarweg 29, 1043 NX Amsterdam, The Netherlands, Registration No. 33156677, Registered in The Netherlands.