Changes

Jump to navigation Jump to search
968 bytes removed ,  14:47, 25 July 2022
no edit summary
=Standalone=
;Launch The following options are available for the standalone (console) mode:<pre>$ basexBaseX [Standalone[Command-Line Client]]Try "help" to get more information.> _</pre>:
You can list the command-line options available for the standalone mode using {{Code|-h}}:
<pre>
$ basex -h
-v Toggle output of progress info
-V Toggle detailed query output
-w Toggle whitespace choppingstripping
-x Toggle output of query plan
-z Toggle output of query result
</pre>
The meaning of all options is Further details are listed in the following table. If an equivalent database option exists (which can be specified via the <code>[[Commands#SET{{Command|SET]]</code> }} command), it is listed as well.For the examples to work, it might be necessary to escape some characters depending on your Operating Systemoperating system.
{| class="wikitable"
|- valign="top"
| {{Code|-c&lt;input&gt;}}
| Executes [[commands]]:* Several commands should be supplied via single <code>-c</code> flags.* If the specified input is a valid URI or file reference, this file will be evaluated as [[Commands#Command_Scripts|Command Script]].
|
|
|• {{Code|-c"list;info"}}<br/>• {{Code|-ccommands.txt}}<br/>• {{Code|-c"<info/>"}}
|- valign="top"
| {{Code|-d}}
|- valign="top"
| {{Code|-R}}
| Specifies if a query will be executed evaluated or parsed and compiled only.
| {{Option|RUNQUERY}}
| <code>true</code>
|- valign="top"
| {{Code|-w}}
| Toggles whitespace chopping stripping of XML text nodes. By default, whitespaces will be choppedpreserved.| {{Option|CHOPSTRIPWS}}| <code>truefalse</code>
|
|- valign="top"
| {{Code|-x}}
| Toggles the output of the query execution plan, formatted as {{Option|XML}}.
| {{Option|XMLPLAN}}
| <code>false</code>
|
|- valign="top"
| {{Code|-X}}
| Generates the query plan before or after query compilation. {{Code|-x}} needs to be activated to make the plan visible.
| {{Option|COMPPLAN}}
| <code>true</code>
|
|- valign="top"
=GUI=
;Launch the GUI:
The <code>basexgui</code> command has only one option. You can pass one or more XML and XQuery files as parameters. If an XML file is specified, a database instance is created from this file, or an existing database is opened. XQuery files following options are opened in available for the XQuery editor.standalone [[GUI|Graphical User Interface]]:
<pre>
$ basexgui -hBaseX [fileGUI]Usage: basexgui [-d] [files] [files] Open specified files -d Enable debugging
</pre>
 
You can pass one or more files as parameters. If an XML document is specified, a database instance can be created from this file. Other files are opened in the editor.
=Server=
;Launch The following options are available for the server<pre>$ basexserverBaseX [[Database Server]Server was started (port]: 1984)</pre>
You can list the available command-line options using {{Code|-h}}:
<pre>
$ basexserver -h
</pre>
The meaning of Details on all options is are listed in the following table (equivalent database options are shown in the table as well).For the examples to work, it might be necessary to escape some characters depending on your Operating Systemoperating system.
{| class="wikitable"
|- valign="top"
| {{Code|-c&lt;input&gt;}}
| Executes [[commands]]:* Several commands should be supplied via single <code>-c</code> flags.* If the specified input is a valid URI or file reference, this file will be evaluated as [[Commands#Command_Scripts|Command Script]].
|
|
|- valign="top"
| {{Code|-d}}
| Turns on the Enables debugging modeoutput. Debugging information is output to ''standard error''.
| {{Option|DEBUG}}
| <code>false</code>
=Client=
;Launch If the console mode communicating with the server[[Database Server|Database Client]] is launched, you will be requested for a username and password.
The user name and password will be requested. The default user/password combination is '''admin'''/'''admin''':
<pre>
$ basexclient
Username: admin
Password: *****
BaseX [Client]
Try "help" to get more information.
&gt; _
</pre>
 
You can list the available command-line options using {{Code|-h}}:
<pre>
$ basexclient -h
-R Toggle query execution
-s<args> Set serialization parameters
-U<name> Specify user nameusername
-v Toggle output of progress info
-V Toggle detailed query output
-w Toggle whitespace choppingstripping
-x Toggle output of query plan
-z Toggle output of query result
</pre>
The meaning of all options is listed in See the following table for details (equivalent database options are shown in the table as well).For the examples to work, it might be necessary to escape some characters , depending on your Operating Systemoperating system.
{| class="wikitable"
|- valign="top"
| {{Code|-b&lt;args&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] or [httphttps://www.w3.org/TR/xquery-30/#id-basics Expanded QName Notation].
| {{Option|BINDINGS}}
|
|- valign="top"
| {{Code|-c&lt;input&gt;}}
| Executes [[commands]]:* Several commands should be supplied via single <code>-c</code> flags.* If the specified input is a valid URI or file reference, its content will be executed instead. Empty lines and lines starting with the number sign {{Code|#}} will be ignored.
|
|
|• {{Code|-c"list;info"}}<br/>• {{Code|-ccommands.txt}}<br/>• {{Code|-c"<info/>"}}
|- valign="top"
| {{Code|-d}}
|- valign="top"
| {{Code|-P&lt;pass&gt;}}
| Specifies the user password. If this flag is omitted, the password will be requested on command line. ''Warning'': when When the password is specified supplied with this flag, it may get visible to othersend up in logs or the bash history.
| {{Option|PASSWORD}}
|
| {{Code|-Uadmin -PadminP...}}
|- valign="top"
| {{Code|-q&lt;expr&gt;}}
|- valign="top"
| {{Code|-U&lt;name&gt;}}
| Specifies the user nameusername. If this flag is omitted, the user name username will be requested on command line.
| {{Option|USER}}
|
|- valign="top"
| {{Code|-w}}
| Toggles whitespace chopping stripping of XML text nodes. By default, whitespaces will be choppedpreserved.| {{Option|CHOPSTRIPWS}}| <code>chopfalse</code>
|
|- valign="top"
| {{Code|-x}}
| Toggles the output of the query execution plan, formatted as {{Option|XML}}.
| {{Option|XMLPLAN}}
| <code>false</code>
|
|- valign="top"
| {{Code|-X}}
| Generates the query plan before or after query compilation. {{Code|-x}} needs to be activated to make the plan visible.
| {{Option|COMPPLAN}}
| <code>after</code>
|
|- valign="top"
=HTTP Server=
;Launch {{Announce|With Version 10, the HTTP server:default ports have been changed from 8984/8985 to 8080/8081.}}<pre>$ basexhttpBaseX The following options are available for the [[Web Application|HTTP Server]Server was started (port]: 1984)HTTP Server was started (port: 8984)</pre>
You can list the available command-line options using {{Code|-h}}:
<pre>
$ basexhttp -h
-c<input> Execute commands from file or string
-d Enable debugging output
-g Enable GZIP support
-h<port> Set port of HTTP server
-l Start in local mode
-s<port> Specify port to stop HTTP server
-S Start as service
-U<name> Specify user nameusername
-z Suppress logging
</pre>
|- valign="top"
| {{Code|-c&lt;input&gt;}}
| Executes [[commands]]:* Several commands should be supplied via single <code>-c</code> flags.* If the specified input is a valid URI or file reference, this file will be evaluated as [[Commands#Command_Scripts|Command Script]].
|
|
| {{Code|-c"open database"}}
|- valign="top"
| {{Code|-de}}| Turns on the Enables debugging modeoutput. Debugging information is output to ''standard error''.
| {{Option|DEBUG}}
|
|
|- valign="top"
| {{Code|-g}}
| Enables GZIP support in Jetty.
| {{Option|GZIP}}
|
|
| Specifies the port on which the HTTP server will be addressable.
| <code>jetty.xml</code>
| {{Code|89848080}}
| {{Code|-h9999}}
|- valign="top"
| Specifies the port that will be used to stop the HTTP server.
| {{Option|STOPPORT}} or<br/><code>pom.xml</code>
| <code>89858081</code>
|
|- valign="top"
|- valign="top"
| {{Code|-U&lt;name&gt;}}
| Specifies a user nameusername, which will be used by the HTTP services for opening a new session.
| {{Option|USER}}
|
=Changelog=
 
;Version 10.0
* Updated: Whitespaces are now preserved by default (see {{Option|STRIPWS}} for more details).
;Version 9.0
 
* Added: BaseXHTTP, command-line option {{Code|-c}}.
* Updated: BaseXHTTP, command-line option {{Code|-c}}, additionally accepts valid URLs and file references.
;Version 8.2
 
* Removed: Event ports, {{Code|-e}}.
;Version 8.1
 
* Added: Bind input strings to the query context with {{Code|-I}}.
;Version 8.0
 
* Removed: Command-line option <code>-L</code> (results will now be automatically separated by newlines).
;Version 7.9
 
* Added: Runs tests in file or directory with {{Code|-t}}.
* Removed: interactive server mode.
;Version 7.8
 
* Added: Specify if a query will be executed or parsed only with {{Code|-R}}.
;Version 7.7
 
* Added: Bind host to the [[#BaseX Server|BaseX Server]] with {{Code|-n}}.
;Version 7.5
 
* Added: detection of [[Commands#Basics|Command Scripts]].
* Removed: HTTP server flags {{Code|-R}}, {{Code|-W}}, and {{Code|-X}}.
; Version 7.3:
 
* Updated: all options are now evaluated in the given order.
* Updated: Create main-memory representations for specified sources with {{Code|-i}}.
; Version 7.2:
 
* Added: RESTXQ Service
; Version 7.1.1:
 
* Added: Options {{Code|-C}} and {{Code|-L}} in standalone and client mode.
; Version 7.1:
 
* Updated: Multiple query files and {{Code|-c}}/{{Code|-i}}/{{Code|-q}} flags can be specified.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu