Dear Gerrit,
currently, external variables are supported by our various language bindings (listed at http://docs.basex.org/wiki/Languages) and JAX-RX, but not on the command line. Your feature request looks quite reasonable, though, so I'll probably add a -b option, similar to the option -s for defining serialization parameters. A command line call will look sth. like that:
basex -bvar1=hello -bvar2=world query.xq
Hope this helps, Christian
On Sun, Jan 23, 2011 at 5:36 PM, Imsieke, Gerrit, le-tex gerrit.imsieke@le-tex.de wrote:
I'm trying to pass a parameter to an xquery file whose first line reads: define variable $db as xs:string external
How may I invoke the BaseX client so that the param will be passed to the query?
Just saw in the 6.5 change log "[ADD] JAX-RX: bind external variables to query and run parameter". Does that mean that passing param is currently only available in the JAX-RX interface?
Maybe you can parse the command line client invocation such that everything after the options and after a xquery file name is considered as param=value pairs?
-Gerrit _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk