Changes

Jump to navigation Jump to search
238 bytes added ,  18:12, 13 November 2011
no edit summary
BaseX [Standalone]
Try "help" to get more information.
>_</pre>
Available command-line options can be listed with the {{Mono|-h}} flag:
<pre>
$ basex -h
Usage: basex [-diosuvVwxzbdiosuvVwxz] [-cq] [file]
[file] Execute XQuery file
-b<pars> Bind external XQuery variables
|- valign="top"
| {{Mono|-b&lt;pars&gt;}}
| Bind Binds external variables to XQuery expressions. This flag may be specified multiple times; key/value pairs . Variables names and their values are separated delimited by equality signs (<code>=</code>). The names may be optionally prefixed with dollar signs. The [[Options#BINDINGS|BINDINGS]] option serves the same purpose.
| <code>-bv=example<br />-q"declare variable $v external; $v"</code>
|- valign="top"
| {{Mono|-c&lt;cmd&gt;}}
| Launch Launches database commands and skip skips the interactive mode. The flag should be placed last, as all remaining characters are interpreted as commands. Several commands can be separated by semicolons.
| {{Mono|-c"list;info"}}
|- valign="top"
| {{Mono|-d}}
| Turn Turns on the debuggingmode. Debugging information is output to ''standard error''.
|
|- valign="top"
| {{Mono|-i&lt;input&gt;}}
| Open Opens a database or XML document specified by the argument. The opened input may be further processed by an XQuery expression.
| {{Mono|-iitems.xml -q"//item"}}
|- valign="top"
| {{Mono|-o&lt;file&gt;}}
| Command All command and query output is written to the specified file.
| {{Mono|}}
|- valign="top"
| {{Mono|-q&lt;expr&gt;}}
| Execute Executes the specified string as XQuery expression. The flag should be placed last, as all remaining characters are interpreted as XQuery.
| {{Mono|-q"doc('input')//head"}}
|- valign="top"
| {{Mono|-s&lt;pars&gt;}}
| Specify Specifies parameters for serializing XQuery results; see [[Serialization]] for more details. This flag may be specified multiple times; key/value pairs . Key and values are separated by the equality signs sign (<code>=</code>).
| <code>-smethod=text</code>
|- valign="top"
| {{Mono|-u}}
| Modify Modifies original files after evaluating XQuery Update expressions.
|
|- valign="top"
| {{Mono|-v}}
| Process Prints process and timing information is written to the ''standard output''.
|
|- valign="top"
| {{Mono|-V}}
| Detailed Prints detailed query information is written to the ''standard output'', including details on the compilation and profiling steps.
|
|- valign="top"
| {{Mono|-w}}
| By default, whitespaces around text nodes are [[Options#CHOP|chopped]] when a database is created. This flag can be specified to preserve whitespaces. The [[Options#CHOP|CHOP]] option serves the same purpose.
|
|- valign="top"
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu