Changes

Jump to navigation Jump to search
6 bytes added ,  12:13, 7 February 2019
no edit summary
Usage: basex [-bcdiIoqrRstuvVwxz] [input]
[input] XQuery or command file, or query string
-b<parsargs> Bind external query variables
-c<input> Execute commands from file or string
-d Toggle debugging output
-i<input> Bind file or database to context
-I<input> Bind input string to context
-o<filepath> Write output to local file
-q<expr> Execute XQuery expression
-r<num> Run query multiple times
-R Toggle query execution
-s<parsargs> Set serialization parameters
-t[path] Run tests in file or directory
-u Toggle updates in original files
|• {{Code|"doc('X')//head"}}<br/>• {{Code|query.xq}}<br/>• {{Code|commands.bxs}}<br/>
|- valign="top"
| {{Code|-b&lt;parsargs&gt;}}
| Binds external variables to XQuery expressions. This flag may be specified multiple times. Variables names and their values are delimited by equality signs (<code>=</code>). The names may be optionally prefixed with dollar signs. 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].
| <code>[[Options#BINDINGS|BINDINGS]]</code>
| {{Code|-I "Hello Universe" -q "."}}
|- valign="top"
| {{Code|-o&lt;filepath&gt;}}
| All command and query output is written to the specified file.
|
| {{Code|-V -R "1"}}
|- valign="top"
| {{Code|-s&lt;parsargs&gt;}}
| Specifies parameters for serializing XQuery results; see [[Serialization]] for more details. This flag may be specified multiple times. Key and values are separated by the equality sign (<code>=</code>).
| <code>[[Options#SERIALIZER|SERIALIZER]]</code>
| <code>-smethod=text</code>
|- valign="top"
| {{Code|-t[path]}}
| Runs all [[Unit Module|Unit tests]] in the specified file or directory.
|
administrator, editor
162

edits

Navigation menu