Dear Mike,
Firstly I apologise if this has been asked before, but I cannot work out how to search this mailing list without downloading all the archives first.
No problem; for further requests, feel free to try our mailing list search:
http://basex.org/service/mailinglist-search/
It's fine in standalone mode (command line), but I cannot find a way of supplying an external variable in the GUI.
You can either specify external variable bindings via the "set" command in the Command mode..
set bindings $firstName=x
..or add a default value to your XQuery expression (this feature is avaiable since XQuery 3.0):
declare variable $firstName as xs:string external := 'x'; $firstName
Hope this helps, Christian