Parameter to xquery
Thursday, 30 January 2014 · 2 messages
LJ
Lars Johnsen30 Jan 2014 17:43 #
Is it possible to pass parameters to xquery modules using BaseX scripting language? I tried something similar to to http-specification but had no luck.
For example, if the code below is stored as add.xq, could $x and $y be supplied in a RUN add.xq command?
declare variable $x external;
declare variable $y external;
let $res := $x + $y
return $resAll the best
Lars G Johnsen
National Library of Norway
FE
Fabrice Etanchaud30 Jan 2014 17:50 #
Hello Lars,
Maybe http://docs.basex.org/wiki/Options#BINDINGS could help you.
BaseX is just fantastic.
Best regards,
Fabrice
Quoted text · Lars Johnsen · 13 lines
De : basex-talk-bounces at mailman.uni-konstanz.de [mailto:basex-talk-bounces at mailman.uni-konstanz.de] De la part de Lars Johnsen Envoyé : jeudi 30 janvier 2014 17:44 À : BaseX Objet : [basex-talk] Parameter to xquery Is it possible to pass parameters to xquery modules using BaseX scripting language? I tried something similar to to http-specification but had no luck. For example, if the code below is stored as add.xq, could $x and $y be supplied in a RUN add.xq command? declare variable $x external; declare variable $y external; let $res := $x + $y return $res All the best Lars G Johnsen National Library of Norway
Written for BaseX 7.7. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery