Changes

Jump to navigation Jump to search
2 bytes added ,  10:01, 18 May 2015
|-
| '''Summary'''
|Contains external variables to be bound to a query. The string must comply with the following rules:* Variable names and values are must be separated by equality signs, and multiple .* Multiple variables are must be delimited by commas.* Commas in values must be duplicated.
* Variables may optionally be introduced with a leading dollar sign.
* Commas that occur in the value itself are encoded by duplication.
* If a variable uses a namespace different to the default namespace, it can be specified with the [http://www.jclark.com/xml/xmlns.htm Clark Notation] or [http://www.w3.org/TR/xquery-30/#id-basics Expanded QName Notation].
* This option can also be used on [[Command-Line Options#BaseX Standalone|command line]] with the flag <code>-b</code>.
|-
| '''Examples'''
|* <code>$a=1,$b=2</code> &nbsp; binds the values {{Code|1}} and {{Code|2}} to the variables $a and $b<br/> * <code>a=1,,2</code> &nbsp; binds the value {{Code|1,2}} to the variable $a<br/> * <code>{URI}a=x</code> &nbsp; binds the value {{Code|x}} to the variable $a with the namespace {{Code|URI}}. * In the following [[Commands#Command_Scripts| Command Script]], the value {{Code|hello world!}} is bound to the variable $BIND-VAR:<pre class="brush:xml">SET BINDINGS BIND-VARGREETING="hello world!"XQUERY declare variable $BIND-VAR GREETING external; $BIND-VARGREETING</pre> &nbsp; binds the value {{Code|hello world!}} to the variable $BIND-VAR and shows how it can be used in a [[Commands#Command_Scripts| Command Script]]. 
|}
Bureaucrats, editor, reviewer, Administrators
12,235

edits

Navigation menu