Changes

Jump to navigation Jump to search
8,359 bytes added ,  12:47, 19 August 2021
no edit summary
This page is linked from the [[Getting Started]] Section.
The options listed on this page influence the way how database [[Commands|commands]] are executed and XQuery expressions are evaluated. Options are divided into [[#Global Options|'''global options''']], which are valid for all BaseX instances, and '''local options''', which are specific to a client or session. Values Two kinds of options are either ''strings'', ''numbers'' or ''booleans''.exist:
The {{Code|.basex}} * '''[[Configuration#Configuration FilesGlobal Options|configuration fileGlobal Options]] ''' are valid for all BaseX instances in the same JVM. This is parsed by every new local BaseX instanceparticularly relevant if you are working with the client/server architecture. It contains * '''Local options''' (all global options and, optionally, local options at the end of the fileremaining ones) are specific to a client or session.
Values of options are either ''strings'', ''numbers'' or ''booleans''. Options are ''static'' and not bound to a single operation (for example, the next command). Various ways exist to access and change options:
* The current value of an option can be requested with the {{Command|GET}} command. Local options can be changed via {{Command|SET}}. All values are ''static'': They stay valid until they are (all global options, except for {{Option|DEBUG}}, can only be changed once again by another operationat startup time). If an option is of type ''boolean'', and if no value is specified, its current value will be inverted.
* Initial values for global options can also be specified via system properties, which can eThe {{Code|.g. be passed on with the basex}} [[http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/java.htmlConfiguration#options -D flagConfiguration Files|configuration file] on command line, or using [http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#setProperty(java.lang.String,%20java.lang.String) System.setProperty()] before creating a is parsed by every new local BaseX instance. The It contains all global options. Local options can be specified keys need to be prefixed with at the end of the file after the {{Code|org.basex.Local Options}}. An examplecomment:
<pre classsyntaxhighlight lang="brushperl"># General OptionsDEBUG = false... # Local OptionsCHOP = false</syntaxhighlight> * Initial values for global options can also be specified via system properties, which can e.g. be passed on with the [https:xquery//docs.oracle.com/en/java/javase/11/tools/java.html -D flag] on command line, or using [https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/System.html#setProperty(java.lang.String,java.lang.String) System.setProperty()] before creating a BaseX instance. The specified keys need to be prefixed with {{Code|org.basex.}}. An example: <syntaxhighlight lang="perl">
java -Dorg.basex.CHOP=false -cp basex.jar org.basex.BaseX -c"get chop"
CHOP: false
</presyntaxhighlight>
* If using the Mac OS X packaged application then global options can be set within the Info.plist file within the Contents folder of the application package. For example:
<pre classsyntaxhighlight lang="brush:xml">
<key>JVMOptions</key>
<array>
<string>-Dorg.basex.CHOP=false</string>
</array>
</presyntaxhighlight>
* In XQuery, local options can be set via option declarations and pragmas (see a [[XQuery ExtensionsWeb Application]]), the default can be adjusted in the {{Code|web.xml}} file as follows:
<syntaxhighlight lang="xml"><context-param> <param-name>org.basex.chop</param-name> <param-value>false</param-value></context-param></syntaxhighlight> * In XQuery, local options can be set via option declarations and [[XQuery Extensions#Pragmas|pragmas]]. If options are implicitly changed by operations in the [[GUI]], the underlying commands will be listed in the [[GUI#Visualizations|Info View]].<br/><br/>
=Global Options=
|-
| '''Default'''
|<code>[[Configuration#Database Directory|{home}/BaseXData]]</code> or <code>[[Configuration#Database Directory|{home}/data]]</code>
|-
| '''Summary'''
===LOGPATH===
 
{{Mark|Updated with Version 8.5}}:
{| width='100%'
|-
| '''Default'''
|<code>[[Configuration#Database Directory|{home}/BaseXReporepo]]</code>
|-
| '''Summary'''
|}
===GLOBALLOCKFAIRLOCK===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|GLOBALLOCK FAIRLOCK [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|Controls Defines the locking strategy:* By default, non-fair is used. Read transactions will be favored, and transactions that access no databases can be evaluated even if local the limit of parallel transactions (databasespecified via {{Option|PARALLEL}}) or global (process) locking will has been reached. This prevents update operations from blocking all other requests. For example, the DBA can further be used for managing to see which jobs are running, even if the queue is full.* If fair locking is enabled, read and write transactions will be treated equally (first in, first out). This avoids starvation of update operations. The article on [[Transaction Management]] provides more details on concurrency control, and it should be used if the prompt evaluation of update operations is critical.
|}
===ASYNCTIMEOUTCACHETIMEOUT=== {{Mark|Introduced with Version 8.5:}}
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ASYNCTIMEOUT CACHETIMEOUT [seconds]}}
|-
| '''Default'''
|-
| '''Summary'''
|Specifies how long many seconds the results of queries, which have been queued by the [[Async Jobs Module|asynchronously executed]], will be cached in main memory.
|}
|-
| '''Summary'''
|Represents a password, which is used for accessing the server or an HTTP service:
* The default value will be overwritten if a client specifies its own credentials.
* If the default value is empty, login will only be possible if the client specifies credentials.
===AUTHMETHOD===
 
{{Mark|Updated with Version 8.5}}: {{Code|custom}} value added.
{| width='100%'
| '''Summary'''
|This is a list of hosts that should be directly accessed. If the value is an empty string, it will be ignored.
|}
 
===IGNOREHOSTNAME===
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|IGNOREHOSTNAME [boolean]}}
|-
| '''Default'''
|{{Code|false}}
|-
| '''Summary'''
|If this option is enabled, hostnames of certificates will not be verified. Use {{Option|IGNORECERT}} to completely disable certificate verification.
|}
|-
| '''Summary'''
|This option can be turned on to ignore untrusted certificates when connecting to servers. Please use this option carefullyUse {{Option|IGNOREHOSTNAME}} to suppress only the hostname verification.
|}
|-
| '''Summary'''
|Specifies the maximum time a read-only transaction triggered by a client may take. If an operation takes longer than the specified timeoutnumber of seconds, it will be aborted. Write Active update operations will not be affected by this timeout, as this would corrupt the integrity of the database. The timeout is deactivated if the timeout is set to {{Code|0}}. It is ignored for operations with [[User Management|admin permissions]].
|}
|-
| '''Summary'''
|Denotes the maximum allowed number of parallel [[Transaction Management|transactions]]:* If {{Option|FAIRLOCK}} is enabled, the number of parallel transactions will never exceed the specified value.<br/>Note * If the option is disabled (which is the default), the limit only applies to transactions that a access databases.* The main reason for allowing parallel operations is to prevent slow transactions from blocking all other operations. A higher number of parallel operations may increase disk activity and thus slow down queries. In some cases, a single transaction may even give you better results than any parallel activity. The main reason for allowing parallel operations is to prevent slow transactions from blocking all other operations.
|}
|}
==HTTP Services== If BaseX is run as web servlet, the HTTP options must be specified in the <code>[https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/webapp/WEB-INF webapp/WEB-INF]</code> directory and the {{Code|jetty.xml}} and {{Code|web.xml}} configuration files. ===WEBPATHLOGTRACE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|WEBPATH LOGTRACE [pathboolean]}}
|-
| '''Default'''
|<code>[[Configuration#Database Directory{{Code|{hometrue}/BaseXWeb]]</code> or <code>[[Configuration#Database Directory|{home}/webapp]]</code>
|-
| '''Summary'''
|Points to the directory in which all the If BaseX is running as [[Web Application]] contents are stored, including XQuery, Scripttrace output (generated via {{Code|fn:trace}}, {{Function|Profiling|prof:dump}} and similar functions) is written to the [[RESTXQLogging|database logs]] and configuration files. This If this option is ignored if disabled, trace output will be redirected to standard error, as it is known from the standalone version of BaseX is deployed as [[Web Application#Servlet_Container|web servlet]].
|}
==HTTP Services=RESTXQPATH= Most HTTP options are defined in the {{Code|jetty.xml}} and {{Code|web.xml}} configuration files in the <code>[https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/webapp/WEB-INF webapp/WEB-INF]</code> directory. Some additional BaseX-specific options exist that will be set before the web server is started: ===WEBPATH===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RESTXQPATH WEBPATH [path]}}
|-
| '''Default'''
|''empty''<code>[[Configuration#Database Directory|{home}/webapp]]</code>
|-
| '''Summary'''
|Points to the directory in which contains all the [[Web Application]] contents are stored, including XQuery, Script, [[RESTXQ]] modules of a and configuration files:* The option is ignored if BaseX is deployed as [[Web Application#Servlet_Container|web applicationservlet]]. Relative paths will * It cannot be resolved against assigned via the {{OptionCode|WEBPATHweb.xml}} directoryfile, as it will be evaluated before the configuration files are parsed.
|}
===CACHERESTXQGZIP===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CACHERESTXQGZIP [boolean]}}
|-
| '''Default'''
|{{Code|<code>false}}</code>
|-
| '''Summary'''
|Caches Jetty provides a [https://www.eclipse.org/jetty/documentation/current/gzip-filter.html Gzip handler] for dynamically uncompressing requests and compressing responses. This feature can be enabled if Jetty is started via the [RESTXQ[Web Application|BaseX HTTP Server]] modules once when starting :* The option can also be enabled on [[Command-Line Options#HTTP Server|command line]] via <code>-g</code>.* It cannot be assigned via the {{Code|web application.<br/>The option is helpful in productive environments with a high loadxml}} file, but as it will be evaluated before the configuration files should not be replaced while are parsed.* The [https://github.com/eclipse/jetty.project/blob/7cc552013eb4d05cb603ba0bc85d176c97957cd4/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java#L187-L211 same defaults] of the web server is runningwill be applied (support for GET requests, exclusion of binaries, MSIE 6.0, etc.).
|}
===RESTPATHRESTXQPATH===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RESTPATH RESTXQPATH [path]}}
|-
| '''Default'''
|-
| '''Summary'''
|Points to the directory which contains XQuery files and command scripts, which can be evaluated via the [[REST#GET Requests|REST run operationRESTXQ]]modules of a web application. Relative paths will be resolved against the {{Option|WEBPATH}} directory.
|}
===HTTPLOCALPARSERESTXQ===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|HTTPLOCAL [boolean]PARSERESTXQ}}
|-
| '''Default'''
|{{Code|false3}}
|-
| '''Summary'''
|By default, if BaseX Timeout after which the RESTXQ directory will be parsed for changes:* If {{Code|0}} is run as [[Web Application]]specified, a database server instance the directory will be started as soon as the first HTTP service parsed every time a RESTXQ function is called. The server can then * A positive value defines the idle time in seconds after which parsing will be addressed by other BaseX clients in parallel to the HTTP servicesenforced.<br/>If the option The default value is set to {{Code|false3}}, : Changes in the database server RESTXQ directory will be detected after 3 seconds without RESTXQ function calls.* Monitoring is completely disabledif a negative value is specified. See [[RESTXQ#Preliminaries|RESTXQ Preliminaries]] for more details.
|}
===STOPPORTRESTXQERRORS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|STOPPORT [port]RESTXQERRORS}}
|-
| '''Default'''
|{{Code|8985true}}
|-
| '''Summary'''
|This is Reports parsing errors in XQuery modules in the port on which RESTXQ directory and returns the [[Startup#BaseX HTTP Server|HTTP Server]] can be locally closed:* The listener for stopping full error message and stack trace to the web server will only be started if the specified value is greater than {{Code|0}}client.* The By default, this option is ignored if BaseX is used as enabled. In a [[Web Application]] or started via [[Web Application#Maven|Maven]].* This option production environment, it can be disabled to suppress errors that should not be seen by the user of an API (the full error information can also still be changed when running looked up in the HTTP server on database logs). See [[Command-Line OptionsRESTXQ#BaseX ServerError Handling|command lineRESTXQ Error Handling]] via <code>-s</code>for more details.|} =Create Options= ==General== ===MAINMEMRESTPATH===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|MAINMEM RESTPATH [booleanpath]}}
|-
| '''Default'''
|{{Code|false}}''empty''
|-
| '''Summary'''
|If this option is turned onPoints to the directory which contains XQuery files and command scripts, new databases will be exclusively created in main memory. Most queries will which can be evaluated faster in main memory mode, but all data is lost if BaseX is shut downvia the [[REST#GET Requests|REST run operation]]. The value of this option Relative paths will be assigned once to a new database, and cannot be changed after thatresolved against the {{Option|WEBPATH}} directory.
|}
===ADDCACHEHTTPLOCAL===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ADDCACHE HTTPLOCAL [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|If this option By default, if BaseX is activatedrun as [[Web Application]], data structures of documents the database server instance will first be cached to disk before being added to started in addition, which can then be addressed by [[Clients]] via the final databaseport (see {{Option|PORT}}). This <br/>If the option is helpful when larger documents need set to {{Code|true}}, no database server will be added, and if the existing heuristics cannot estimate the input size (e.g. when adding directories or sending input streams)launched.
|}
==Parsing== ===CREATEFILTERSTOPPORT===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CREATEFILTER STOPPORT [filterport]}}
|-
| '''Default'''
|{{Code|*.xml8985}}
|-
| '''Summary'''
|File filter in This is the port on which the [[CommandsStartup#Glob SyntaxBaseX HTTP Server|Glob SyntaxHTTP Server]], which can be locally closed:* The listener for stopping the web server will only be started if the specified value is greater than {{Code|0}}.* The option is ignored if BaseX is applied whenever new databases are created, used as a [[Web Application]] or resources are added to a databasestarted via [[Web Application#Maven|Maven]].* This option can also be changed when running the HTTP server on [[Command-Line Options#BaseX Server|command line]] via <code>-s</code>.
|}
=Create Options= =ADDARCHIVES=General== ===MAINMEM===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ADDARCHIVES MAINMEM [boolean]}}
|-
| '''Default'''
|{{Code|truefalse}}
|-
| '''Summary'''
|If this option is set turned on, new databases will be created in main memory:* Most queries will be evaluated faster in main-memory mode, but all data is lost if the BaseX instance in which the database was created is shut down.* It is not possible to store binary resources in a main-memory database.* A main-memory database will have no disk representation. However, it is possible to export the database via the {{CodeCommand|trueEXPORT}}command, files within archives (ZIPand create a new database from the exported file in a second step.* This option will not be available for [[Database Module#db:create|db:create]], GZIPbecause the database would not be accessible anymore after database creation, TAR, TGZ, DOCXi. e., etc.) are parsed whenever new databases are created or resources are added to a databaseoutside the query scope.
|}
===ARCHIVENAMEADDCACHE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ARCHIVENAME ADDCACHE [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|If this option is set to {{Code|true}}activated, the file name data structures of parsed archives documents will first be included in cached to disk before being added to the final database. This option is helpful when larger documents need to be added, and if the existing heuristics cannot estimate the document pathsinput size (e.g. when adding directories or sending input streams).
|}
==Parsing=SKIPCORRUPT= ===CREATEFILTER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|SKIPCORRUPT CREATEFILTER [booleanfilter]}}
|-
| '''Default'''
|{{Code|false*.xml}}
|-
| '''Summary'''
|Skips corrupt (i.e.File filter in the [[Commands#Glob Syntax|Glob Syntax]], not well-formed) files while creating a database or adding which is applied whenever new documents. If this option is activateddatabases are created, document updates or resources are slowed down, as all files will be parsed twice. Next, main memory consumption will be higher as parsed files will be cached in main memoryadded to a database.
|}
===ADDRAWADDARCHIVES===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ADDRAW ADDARCHIVES [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|If this option is activated, and if new resources are added set to a database, all files that are not filtered by the {{OptionCode|CREATEFILTERtrue}} option will be added as ''raw'' , files within archives (iZIP, GZIP, TAR, TGZ, DOCX, etc.e., in their binary representation)are parsed whenever new databases are created or resources are added to a database.
|}
===PARSERARCHIVENAME===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|PARSER ARCHIVENAME [typeboolean]}}
|-
| '''Default'''
|{{Code|XMLfalse}}
|-
| '''Summary'''
|Defines a [[ParsersIf this option is set to {{Code|parser]] for importing new files to true}}, the database. Currently, 'XML', 'JSON', 'CSV', 'TEXT', 'HTML' are available as parsers. HTML file name of parsed archives will be parsed as normal XML files if [http://home.ccil.org/~cowan/XML/tagsoup/ Tagsoup] is not found included in the classpathdocument paths.
|}
===CSVPARSERSKIPCORRUPT===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CSVPARSER SKIPCORRUPT [optionsboolean]}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''Summary'''
|Specifies the way how CSV data will be parsedSkips corrupt (i.e. Keys and values are delimited with <code>=</code>, and multiple options are delimited with <code>,</code>not well-formed) files while creating a database or adding new documents. The available options (except for the additional <code>encoding</code> If this option) is activated, document updates are described in the [[CSV Module#Options|CSV Module]]slowed down, as all files will be parsed twice.|-| '''Examples'''|<code>encoding=CP1252Next,header=true</code> parses the input main memory consumption will be higher as CP1252 and the first line as headerparsed files will be cached in main memory.
|}
===JSONPARSERADDRAW===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|JSONPARSER ADDRAW [optionsboolean]}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''Summary'''
|Specifies the way how JSON data will be parsed. Keys and values are delimited with <code>=</code>If this option is enabled, and multiple options all resources that are delimited with <code>,</code>. The available options (except for filtered out by the additional <code>encoding</code> {{Option|CREATEFILTER}} option) are described in the while being added to a database will be stored as [[JSON Module#OptionsBinary Data|JSON Moduleraw files]]instead (i.e.|-| '''Examples'''|<code>format=jsonml,lax=yes</code> interprets the input as JSONML and uses lax parsingin their binary representation).
|}
===HTMLPARSERPARSER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|HTMLPARSER PARSER [optionstype]}}
|-
| '''Default'''
|''empty''{{Code|XML}}
|-
| '''Summary'''
|Specifies Defines a [[Parsers|parser]] for importing new files to the way how HTML data will be parseddatabase. Keys and values Available parsers are delimited with <code>=</code>{{Code|XML}}, {{Code|JSON}}, {{Code|CSV}}, {{Code|TEXT}}, {{Code|HTML}}, and multiple options are delimited with <code>,</code>{{Code|RAW}}. The available options are described in the HTML input will be parsed as XML documents if [[Parsers#HTML_Parser|Tagsoup]] article.|-| '''Examples'''|<code>encoding=Shift-JIS,nons=true</code> parses is not found in the input as Sihft-JIS and suppresses namespacesclasspath.
|}
===TEXTPARSERCSVPARSER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TEXTPARSER CSVPARSER [options]}}
|-
| '''Default'''
|-
| '''Summary'''
|Specifies the way how TEXT CSV data will be parsed. Keys and values are delimited with <code>=</code>, and multiple options are delimited with <code>,</code>. The available options (except for the additional <code>encoding</code> option) are listed described in the [[ParsersCSV Module#Options|CSV Module]] article.
|-
| '''Examples'''
|<code>linesencoding=CP1252,header=true</code> creates a single element for each parses the input as CP1252 and the first line of textas header.
|}
==XML Parsing== ===CHOPJSONPARSER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CHOP JSONPARSER [booleanoptions]}}
|-
| '''Default'''
|{{Code|true}}''empty''
|-
| '''Summary'''
|Many XML documents include whitespaces that have been added to improve readability. This option controls Specifies the [http://wwwway how JSON data will be parsed.w3.orgKeys and values are delimited with <code>=</TR/REC-xml/#sec-white-space white-space processing mode] of the XML parser:* With the default value {{Code|true}}code>, leading and trailing whitespaces from text nodes will be chopped and all empty text nodes will be discarded.* The flag should be turned off if a document contains [[Full-Text#Mixed Content|mixed content]].* The flag can also be turned off on [[Command-Line Options#BaseX Standalone|command line]] via multiple options are delimited with <code>-w,</code>.* If The available options (except for the additional <code>xml:space="preserve"encoding</code> attribute is attached to an element, chopping will be turned off for all descendant text nodes. In the following example document, the whitespaces option) are described in the text nodes of the {{Code[[JSON Module#Options|text}} element will not be chopped:JSON Module]].<pre class="brush:xml">|-<xml>| '''Examples''' |<title> Demonstrating the CHOP flag </titlecode> <text xml:spaceformat="preserve">To <b>be</b>jsonml, or not to <b>belax=yes</bcode>, that is interprets the questioninput as JSONML and uses lax parsing.</text></xml></pre>|}
===STRIPNSHTMLPARSER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|STRIPNS HTMLPARSER [booleanoptions]}}
|-
| '''Default'''
|{{Code|false}}''empty''
|-
| '''Summary'''
|Strips all Specifies the way how HTML data will be parsed. Keys and values are delimited with <code>=</code>, and multiple options are delimited with <code>,</code>. The available options are described in the [[Parsers#Options|Parsers]] article.|-| '''Examples'''|* <code>encoding=Shift-JIS,nons=true</code> parses the input as Sihft-JIS and suppresses namespaces from an XML document and all elements while parsing.* <code>lexical=true</code> preserves comments.
|}
===INTPARSETEXTPARSER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|INTPARSE TEXTPARSER [booleanoptions]}}
|-
| '''Default'''
|{{Code|false}}''empty''
|-
| '''Summary'''
|Uses Specifies the internal XML parser instead of the standard Java XML parserway how TEXT data will be parsed. The internal parser is fasterKeys and values are delimited with <code>=</code>, more fault tolerant and supports common HTML entities out-of-multiple options are delimited with <code>,</code>. The available options are listed in the[[Parsers]] article.|-box, but it does not support all features needed | '''Examples'''|<code>lines=true</code> creates a single element for parsing DTDseach line of text.
|}
==XML Parsing=DTD= ===CHOP===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DTD CHOP [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|Parses referenced DTDs and resolves Many XML entitiesdocuments include whitespaces that have been added to improve readability. By This option controls the [https://www.w3.org/TR/REC-xml/#sec-white-space white-space processing mode] of the XML parser:* With the defaultvalue {{Code|true}}, this option leading and trailing whitespaces from text nodes will be chopped and all empty text nodes will be discarded.* The flag should be turned off if a document contains [[Full-Text#Mixed Content|mixed content]].* The flag can also be turned off on [[Command-Line Options#BaseX Standalone|command line]] via <code>-w</code>.* If the <code>xml:space="preserve"</code> attribute is switched attached to an element, chopping will be turned off for all descendant text nodes.  In the following example document, the whitespaces in the text nodes of the {{Code|falsetext}}element will not be chopped:<syntaxhighlight lang="xml"><xml> <title> Demonstrating the CHOP flag </title> <text xml:space="preserve">To <b>be</b>, as many DTDs are located externallyor not to <b>be</b>, which may completely block that is the process of creating new databasesquestion. The </text></xml></syntaxhighlight>It is recommendable to additionally assign <code>indent=no</code> to the {{Option|CATFILESERIALIZER}} option can ; otherwise the serialized documents will automatically be changed to locally resolve DTDsindented.
|}
===XINCLUDESTRIPNS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|XINCLUDE STRIPNS [boolean]}}
|-
| '''Default'''
|{{Code|truefalse}}
|-
| '''Summary'''
|Resolves XInclude inclusion tags Strips all namespaces from an XML document and merges referenced XML documents. By default, this option is switched to {{Code|true}}. This option is only available if the standard Java XML Parser is used (see {{Option|INTPARSE}})all elements while parsing.
|}
===CATFILEINTPARSE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CATFILE INTPARSE [pathboolean]}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''Summary'''
|Specifies a catalog file Uses the internal XML parser instead of the standard Java XML parser. Here are some reasons for using the internal parser:* Performance: Documents (in particular small ones) will be parsed faster* Fault tolerance: invalid characters will automatically be replaced with the Unicode replacement character <code>FFFD</code> (&#xFFFD;)* Entities: around 250 HTML entities will be detected and decodedYou will be able to locally resolve DTDscorrectly parse most XML documents with the internal parser. See Java’s Xerces parser is still used as default, however, because it supports all features of the entry on [[Catalog Resolver]]s for more detailsXML standard and advanced DTD features, such as recursive entity expansion.
|}
==Indexing== The following options control the creation of index structures. The current values will be considered if a new database is created. See [[Indexes]] for more details. ===TEXTINDEXDTD===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TEXTINDEX DTD [boolean]}}
|-
| '''Default'''
|{{Code|truefalse}}
|-
| '''Summary'''
|Creates a text index whenever a Parses referenced DTDs and resolves XML entities. By default, this option is switched to {{Code|false}}, as many DTDs are located externally, which may completely block the process of creating new database is created. A text index speeds up queries with equality comparisons on text nodesdatabases. See [[Index#Text IndexThe {{Option|Text Index]] for more detailsCATFILE}} option can be changed to locally resolve DTDs.
|}
===ATTRINDEXXINCLUDE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ATTRINDEX XINCLUDE [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|Creates an attribute index whenever a new database Resolves XInclude inclusion tags and merges referenced XML documents. By default, this option is createdswitched to {{Code|true}}. An attribute index speeds up queries with equality comparisons on attribute values. See [[Index#Attribute IndexThis option is only available if the standard Java XML Parser is used (see {{Option|Attribute Index]] for more detailsINTPARSE}}).
|}
===TOKENINDEXCATFILE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TOKENINDEX CATFILE [booleanpath]}}
|-
| '''Default'''
|{{Code|true}}''empty''
|-
| '''Summary'''
|Creates a token index whenever a new database is created. A token index speeds up searches for single tokens in attribute valuesSemicolon-separated list of XML catalog files to resolve URIs. See [[Index#Token Index|Token IndexCatalog Resolver]] s for more details.
|}
==Indexing=FTINDEX= The following options control the creation of index structures. The current values will be considered if a new database is created. See [[Indexes]] for more details. ===TEXTINDEX===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|FTINDEX TEXTINDEX [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|Creates a full-text index whenever a new database is created. A full-text index speeds up queries with full-equality comparisons on text expressionsnodes. See [[Index#Full-Text Index|Full-Text Index]] for more details.
|}
===TEXTINCLUDEATTRINDEX===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TEXTINCLUDE ATTRINDEX [namesboolean]}}
|-
| '''Default'''
|''empty''{{Code|true}}
|-
| '''Summary'''
|Defines name patterns for the parent elements of texts that are indexedCreates an attribute index whenever a new database is created. By default, all text nodes will be indexed.<br/>Name patterns are separated by commasAn attribute index speeds up queries with equality comparisons on attribute values. See [[IndexesIndex#Selective IndexingAttribute Index|Selective IndexingAttribute Index]] for more details.
|}
===ATTRINCLUDETOKENINDEX===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ATTRINCLUDE TOKENINDEX [namesboolean]}}
|-
| '''Default'''
|''empty''{{Code|true}}
|-
| '''Summary'''
|Defines name patterns Creates a token index whenever a new database is created. A token index speeds up searches for the attributes to be indexed. By default, all single tokens in attribute nodes will be indexed.<br/>Name patterns are separated by commasvalues. See [[IndexesIndex#Selective IndexingToken Index|Selective IndexingToken Index]] for more details.
|}
===TOKENINCLUDEFTINDEX===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TOKENINCLUDE FTINDEX [namesboolean]}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''Summary'''
|Defines name patterns for the attributes to be indexedCreates a full-text index whenever a new database is created. By default, tokens in all attribute nodes will be indexed.<br/>Name patterns are separated by commasA full-text index speeds up queries with full-text expressions. See [[IndexesIndex#Selective IndexingFull-Text Index|Selective IndexingFull-Text Index]] for more details.
|}
===FTINCLUDETEXTINCLUDE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|FTINCLUDE TEXTINCLUDE [names]}}
|-
| '''Default'''
|}
===MAXLENATTRINCLUDE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|MAXLEN ATTRINCLUDE [intnames]}}
|-
| '''Default'''
|{{Code|96}}''empty''
|-
| '''Summary'''
|Specifies Defines name patterns for the maximum length of strings that are attributes to be indexed by the name, path, value. By default, and full-text index structures. The value of this option all attribute nodes will be assigned once to a new database, and cannot be changed after thatindexed.<br/>Name patterns are separated by commas. See [[Indexes#Selective Indexing|Selective Indexing]] for more details.
|}
===MAXCATSTOKENINCLUDE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|MAXCATS TOKENINCLUDE [intnames]}}
|-
| '''Default'''
|{{Code|100}}''empty''
|-
| '''Summary'''
|Specifies Defines name patterns for the maximum number of distinct values (categories) that attributes to be indexed. By default, tokens in all attribute nodes will be stored together with the elementindexed.<br/attribute names or unique paths in the [[Index#>Name Index|Name Index]] or patterns are separated by commas. See [[IndexIndexes#Path IndexSelective Indexing|Path IndexSelective Indexing]]. The value of this option will be assigned once to a new database, and cannot be changed after thatfor more details.
|}
===UPDINDEXFTINCLUDE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|UPDINDEX FTINCLUDE [booleannames]}}
|-
| '''Default'''
|{{Code|false}}''empty''
|-
| '''Summary'''
|If turned on, incremental indexing will be enabled:* The current value of this option will be assigned to new databases. It can be changed Defines name patterns for existing databases by running {{Command|OPTIMIZE}} with the {{Code|ALL}} keyword or [[Database_Module#db:optimize|db:optimize($db, true())]]parent elements of texts that are indexed.* After each updateBy default, the value indexes all text nodes will be refreshed as wellindexed. Incremental updates <br/>Name patterns are currently not available for the full-text index and database statisticsseparated by commas.* Find more details in the article on See [[IndexIndexes#UpdatesSelective Indexing|Index StructuresSelective Indexing]]for more details.
|}
===AUTOOPTIMIZEMAXLEN===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|AUTOOPTIMIZE MAXLEN [booleanint]}}
|-
| '''Default'''
|{{Code|false96}}
|-
| '''Summary'''
|If turned on, auto optimization will be applied Specifies the maximum length for strings to new databases:* With each update, outdated indexes and database statistics will be recreated.* As a result, the stored in [[Indexes|index structures will always be up-to-date]].* However, updates can take much longer, so this option should only be activated for medium-sized databases.* The value of this option will be assigned once to a new database. It , and can only be reassigned changed by running {{Command|OPTIMIZE}} creating a new database or doing a [[Database_ModuleCommands#db:optimizeOPTIMIZE|db:optimizefull optimization]].|}
===SPLITSIZEMAXCATS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|SPLITSIZE MAXCATS [numint]}}
|-
| '''Default'''
|{{Code|0100}}
|-
| '''Summary'''
|This option affects Specifies the maximum number of distinct values (categories) that will be stored together with the element/attribute names or unique paths in the [[IndexesIndex#Name Index|Name Index]] or [[Index#PerformancePath Index|constructionPath Index]] of new value indexes. It controls the number of index build operations that are performed before writing partial index data to disk:* The larger the assigned value is, the less splits of this option will take placebe assigned once to a new database, and the more main memory will cannot be required.* By default, if the value is set to {{Code|0}}, some heuristics are applied, based on the current memory consumptionchanged after that.
|}
==Full-Text Indexing== ===STEMMINGUPDINDEX===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|STEMMING UPDINDEX [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|If turned on, incremental indexing will be enabled:* The current value of this option will be assigned to new databases. It can be changed for existing databases by running {{Command|OPTIMIZE}} with the {{Code|trueALL}}keyword or [[Database_Module#db:optimize|db:optimize($db, true())]].* After each update, all tokens the value indexes will be stemmed during refreshed as well. Incremental updates are currently not available for the full-text indexing, using a language-specific stemmer implementationindex and database statistics. By default, tokens will not be stemmed. See * Find more details in the article on [[IndexesIndex#Full-Text IndexUpdates|Full-Text IndexStructures]] for more details.
|}
===CASESENSAUTOOPTIMIZE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CASESENS AUTOOPTIMIZE [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|If {{Code|true}}turned on, auto optimization will be applied to new databases:* With each update, outdated indexes and database statistics will be recreated.* As a result, the case of tokens index structures will always be preserved during fullup-text indexingto-date. By default* However, case will updates can take much longer, so this option should only be ignored (all tokens activated for medium-sized databases.* The value of this option will be indexed in lower case)assigned once to a new database. See It can be reassigned by running {{Command|OPTIMIZE}} or [[IndexesDatabase_Module#Full-Text Indexdb:optimize|Full-Text Indexdb:optimize]] for more details.
|}
===DIACRITICSSPLITSIZE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DIACRITICS SPLITSIZE [booleannum]}}
|-
| '''Default'''
|{{Code|false0}}
|-
| '''Summary'''
|If This option affects the [[Indexes#Performance|construction]] of new value indexes. It controls the number of index build operations that are performed before writing partial index data to disk:* By default, if the value is set to {{Code|true0}}, diacritics will be preserved during full-text indexingsome heuristics are applied, based on the current memory consumption. By defaultUsually, diacritics will be removedthis works fine.* If explicit garbage collection is disabled when running Java (e.g. See [[Indexes#Fullvia the JVM option {{Code|-Text IndexXX:+DisableExplicitGC}}), you may need to choose a custom split size.* You can e. g. start with {{Code|Full-Text Index]] for 1000000}} (one million) index operations and adjust this value in the next steps.* The larger the assigned value is, the less splits will take place, and the more detailsmain memory will be required.
|}
==Full-Text Indexing=LANGUAGE= ===STEMMING===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|LANGUAGE STEMMING [langboolean]}}
|-
| '''Default'''
|{{Code|enfalse}}
|-
| '''Summary'''
|The specified language will influence the way how texts If {{Code|true}}, all tokens will be tokenized and stemmedduring full-text indexing, using a language-specific stemmer implementation. It can By default, tokens will not be the name of a language or a language codestemmed. See [[Indexes#Full-Text Index|Full-Text Index]] for more details.
|}
===STOPWORDSCASESENS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|STOPWORDS CASESENS [pathboolean]}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''Summary'''
|A new If {{Code|true}}, the case of tokens will be preserved during full-text index indexing. By default, case will drop be ignored (all tokens that are listed will be indexed in the specified stopword list. A stopword list may decrease the size of the full text indexlower case). See [[Indexes#Full-Text Index|Full-Text Index]] for more details.
|}
=Query Options= ===QUERYINFODIACRITICS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|QUERYINFO DIACRITICS [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|Prints more information on internal query rewritingsIf set to {{Code|true}}, optimizations, and performancediacritics will be preserved during full-text indexing. By default, this info is shown in the diacritics will be removed. See [[GUIIndexes#VisualizationsFull-Text Index|Info View]] in the GUI. It can also be activated on [[CommandFull-Line Options#BaseX Standalone|command lineText Index]] via <code>-V</code>for more details.
|}
===XQUERY3LANGUAGE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|XQUERY3LANGUAGE [lang]}}
|-
| '''Default'''
|{{Code|trueen}}
|-
| '''Summary'''
|Enables all The specified language will influence the way how texts will be tokenized and stemmed. It can be the name of a language or a language code. See [[XQuery 3.0Indexes#Full-Text Index|Full-Text Index]] features supported by BaseX. If this option is set to {{Code|false}}, the XQuery parser will only accept expressions of the XQuery 1.0 specificationfor more details.
|}
===MIXUPDATESSTOPWORDS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|MIXUPDATESSTOPWORDS [path]}}
|-
| '''Default'''
|{{Code|false}}''empty''
|-
| '''Summary'''
|Allows queries to both contain updating and non-updating expressions. All updating constraints will be turned offIf a text file with stop words is specified, and nodes to be returned frequently used terms contained in that file will be copied before they are modified by an updating expressionignored when a full-text index is created. – By default, this option is set to {{Code|false}}, because A stopword list may decrease the size of the XQuery Update Facility does not allow an updating query to full text index and speed up your queries. See [[XQuery UpdateIndexes#Returning ResultsFull-Text Index|return resultsFull-Text Index]]for more details.
|}
=Query Options= =BINDINGS==QUERYINFO===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|BINDINGS QUERYINFO [varsboolean]}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''Summary'''
|Contains external variables to be bound to a Prints more information on internal query. The string must comply with the following rules:* Variable names rewritings, optimizations, and values must be separated by equality signs.* Multiple variables must be delimited by commasperformance.* Commas in values must be duplicated.* Variables may optionally be introduced with a leading dollar sign.* If a variable uses a namespace different to the By default namespace, it can be specified with this info is shown in the [http://www.jclark.com/xml/xmlns.htm Clark Notation] or [http://www.w3.org/TR/xquery-30/GUI#id-basics Expanded QName NotationVisualizations|Info View]]in the GUI.This option It can also be used activated on [[Command-Line Options#BaseX Standalone|command line]] with the flag via <code>-bV</code>.|-| '''Examples'''|* <code>$a=1,$b=2</code> &nbsp; binds the values {{Code|1}} and {{Code|2}} to the variables $a and $b* <code>a=1,,2</code> &nbsp; binds the value {{Code|1,2}} to the variable $a* <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 $GREETING:<pre class="brush:xml">SET BINDINGS GREETING="hello world!"XQUERY declare variable $GREETING external; $GREETING</pre>|} ===QUERYPATHMIXUPDATES=== {| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|QUERYPATH [path]MIXUPDATES}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''Summary'''
|Contains the path (''base URI'') Allows queries to the executed query (default: ''empty'')both contain updating and non-updating expressions. This directory All updating constraints will be used turned off, and nodes to resolve relative paths to documentsbe returned will be copied before they are modified by an updating expression. By default, query modulesin compliance with the XQuery Update Facility, and other resources addressed in a querythis option is set to {{Code|false}}. See [[XQuery Update#Returning Results|Returning Results]] for more details.
|}
===INLINELIMITBINDINGS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|INLINELIMITBINDINGS [vars]}}
|-
| '''Default'''
|{{Code|100}}''empty''
|-
| '''Summary'''
|The XQuery compiler inlines functions Contains external variables to be bound to speed up a query evaluation. Inlining will only take place if The string must comply with the following rules:* Variable names and values must be separated by equality signs.* Multiple variables must be delimited by commas.* Commas in values must be duplicated.* Variables may optionally be introduced with a function body is not too large (i.eleading dollar sign.* If a variable uses a namespace different to the default namespace, if it does not contain too many expressions)can be specified with the [http://www.jclark.com/xml/xmlns.htm Clark Notation] or [https://www.w3.org/TR/xquery-30/#id-basics Expanded QName Notation]. With this This option, this maximum number of expressions can also be specifiedused 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* <code>a=1,,2<br/code>Function inlining can be turned off by setting &nbsp; binds the value to {{Code|01,2}}. The limit can be locally overridden via to the variable $a* <code>{URI}a=x</code> &nbsp; binds the value {{Code|x}} to the variable $a with the namespace {{Code|URI}}.* In the following [[XQuery_3.0Commands#AnnotationsCommand_Scripts|%basex:inlineCommand Script]], the value {{Code|hello world!}} is bound to the variable {{Code|$GREETING}}:<syntaxhighlight lang="xquery">SET BINDINGS GREETING="hello world!"XQUERY declare variable $GREETING external; $GREETING</codesyntaxhighlight> annotation.|} ===TAILCALLSINLINELIMIT===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TAILCALLSINLINELIMIT}}
|-
| '''Default'''
|{{Code|25650}}
|-
| '''Summary'''
|Specifies how many stack frames This option controls inlining of [httpXQuery functions://en* The XQuery compiler inlines functions to speed up query evaluation.wikipedia* Inlining will only take place if a function body is not too large (i.e.org/wiki/Tail_call tail-calls] are allowed on the stack at any time, if it does not contain too many expressions). When * With this limit is reachedoption, tail-call optimization takes place and some call frames are eliminatedthis maximum number of expressions can be specified. The feature * Function inlining can be turned off by setting the value to {{Code|-10}}.* The limit can be locally overwritten via the [[XQuery Extensions#Function Inlining|%basex:inline]] annotation (follow the link to get more information on function inlining).
|}
===DEFAULTDBUNROLLLIMIT=== {{Mark|Introduced with Version 9.6:}}
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DEFAULTDBUNROLLLIMIT}}
|-
| '''Default'''
|{{Code|false5}}
|-
| '''Summary'''
|If this This option is turned on, paths specified in controls the [[Databases#XML Documents|fn:doc]] and [[Databases#XML Documents|fnunroll limit:collection]] functions will first be resolved against a database that has been opened in the global context outside the query (e.g. * Loops with few iterations are ''unrolled'' by the {{Command|OPEN}} command)XQuery compiler to enable further optimizations. * If the path does not match any existing resourceslimit is increased, it more optimizations will be resolved as described in take place, but the article on memory consumption and compile time will increase.* See [[DatabasesXQuery Optimizations#Access ResourcesLoop Unrolling|accessing database resourcesLoop Unrolling]]for more details.
|}
===FORCECREATEENFORCEINDEX===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|FORCECREATE ENFORCEINDEX [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|By activating this option, database instances will be created with the XQuery functions Enforces index rewritings in path expressions. See [[DatabasesIndexes#XML DocumentsEnforce Rewritings|fn:doc]] and [[Databases#XML Documents|fn:collectionEnforce Rewritings]]for details.
|}
===CHECKSTRINGSCOPYNODE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CHECKSTRINGS COPYNODE [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|By default, characters from external sources that are invalid When creating new nodes in XML will trigger an errorXQuery via [https://www.w3. If the option is set to <code>false<org/TR/xquery-31/code>#id-constructors Node Constructors], these characters all enclosed nodes will be replaced copied, and all resulting nodes will get new node identities. This step can be very expensive, and it can be disabled with the Unicode replacement character <code>FFFD</code> (&#xFFFD;)this option. The option affects [[Java Bindings]] and string conversion and input functions such should be used carefully, as it changes the standard behavior of XQuery. It should preferrably be used in [[Archive Module#archive:create|archive:create]], [[Archive Module#archive:extract-text|archive:extract-text]], [[Archive Module#archive:update|archive:update]], and [[ZIP ModuleXQuery Extensions#zip:text-entryDatabase Pragmas|zip:text-entryPragmas]].
|}
===LSERRORTAILCALLS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|LSERROR [error]TAILCALLS}}
|-
| '''Default'''
|{{Code|0256}}
|-
| '''Summary'''
|This option specifies Specifies how many stack frames of [https://en.wikipedia.org/wiki/Tail_call tail-calls] are allowed on the maximum Levenshtein error for the BaseXstack at any time. When this limit is reached, tail-specific fuzzy match optioncall optimization takes place and some call frames are eliminated. See The feature can be turned off by setting the page on [[Full-Text#Fuzzy_Queryingvalue to {{Code|Full-Texts]] for more information on fuzzy querying1}}.
|}
===RUNQUERYWITHDB===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RUNQUERY [boolean]WITHDB}}
|-
| '''Default'''
|-
| '''Summary'''
|Specifies if a query will be executed or parsed onlyBy default, resources specified via [[Databases#XML Documents|fn:doc]] and [[Databases#XML Documents|fn:collection]] are looked up both in the database and in the file system. This If you always use {{Function|Database|db:open}} to access databases, it is recommendable to disable this option can also :* No locks will be changed on created for the two functions (see [[Command-Line OptionsTransaction Management#BaseX StandaloneLimitations|command linelimitations of database locking]] via <code>-R</code>for more details).* Access to local and external resources will be faster, as the database lookup will be skipped.
|}
===RUNSDEFAULTDB===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RUNS [num]DEFAULTDB}}
|-
| '''Default'''
|{{Code|1false}}
|-
| '''Summary'''
|Specifies how often If this option is turned on, paths specified in the [[Databases#XML Documents|fn:doc]] and [[Databases#XML Documents|fn:collection]] functions will first be resolved against a database that has been opened in the global context outside the query will be evaluated(e.g. The result is serialized only once, and by the measured times are averages of all runs{{Command|OPEN}} command). This option can also If the path does not match any existing resources, it will be changed resolved as described in the article on [[Command-Line OptionsDatabases#BaseX StandaloneAccess Resources|command lineaccessing database resources]] via <code>-r</code>.
|}
=Serialization Options= ===SERIALIZEFORCECREATE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|SERIALIZE FORCECREATE [boolean]}}
|-
| '''Default'''
|{{Code|truefalse}}
|-
| '''Summary'''
|Results of XQuery expressions will be serialized if By activating this option is turned on. For debugging purposes and performance measurements, this option can database instances will be set to {{Codecreated with the XQuery functions [[Databases#XML Documents|false}}. It can also be turned off on fn:doc]] and [[Command-Line OptionsDatabases#BaseX StandaloneXML Documents|command linefn:collection]] via <code>-z</code>.
|}
===SERIALIZERCHECKSTRINGS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|SERIALIZER CHECKSTRINGS [paramsboolean]}}
|-
| '''Default'''
|''empty''{{Code|true}}
|-
| '''Summary'''
|Parameters for [[Serialization|serializing]] query resultsBy default, characters from external sources that are invalid in XML will trigger an error. The string must comply with If the following rules:* Variable names and values must be separated by equality signs.* Multiple variables must be delimited by commas.* Commas in values must be duplicated.The option can also is set to <code>false</code>, these characters will be used on [[Command-Line Options#BaseX Standalone|command line]] replaced with the flag Unicode replacement character <code>-sFFFD</code>(&#xFFFD;).The option affects [[Java Bindings]] and string conversion and input functions such as [[Archive Module#archive:create|archive:create]], [[Archive Module#archive:extract-text| '''Examples'''|* <code>encoding=USarchive:extract-ASCIItext]],omit-xml-declaration=no</code> [[Archive Module#archive: sets the encoding to {{Codeupdate|US-ASCII}} archive:update]], and prints the XML declaration.* <code>item[[ZIP Module#zip:text-separator=,,</code> entry|zip: separates serialized items by a single commatext-entry]].
|}
===EXPORTERWRAPJAVA===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|EXPORTER WRAPJAVA [paramsmode]}}
|-
| '''Default'''
|''empty''{{Code|some}}
|-
| '''Summary'''
|Contains parameters for exporting all resources of a databaseDefines the way how values that result from Java code invocation will be converted to XQuery items. Keys and Allowed values are separated by equality signs: {{Code|none}}, multiple parameters are delimited by commas{{Code|all}}, {{Code|some}}, {{Code|instance}}, and {{Code|void}}. See [[SerializationJava_Bindings#Conversion to XQuery|Java Bindings]] for more further details.
|}
===XMLPLANLSERROR===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|XMLPLAN LSERROR [booleanerror]}}
|-
| '''Default'''
|{{Code|false0}}
|-
| '''Summary'''
|Prints This option specifies the execution plan of an XQuery expression in its XML representationmaximum Levenshtein error for fuzzy full-text matching. This option can also be activated on By default, if {{Code|0}} is assigned, the error value is calculated dynamically. See [[CommandFull-Line OptionsText#BaseX StandaloneFuzzy_Querying|command lineFuzzy Querying]] via <code>-x</code>for more details.
|}
===COMPPLANRUNQUERY===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|COMPPLAN RUNQUERY [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|Generates the Specifies if a query plan, which can will be activated via {{Option|XMLPLAN}}, before executed or after query compilationparsed only. This option can also be activated changed on [[Command-Line Options#BaseX Standalone|command line]] via <code>-XR</code>.
|}
===DOTPLANRUNS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DOTPLAN RUNS [booleannum]}}
|-
| '''Default'''
|{{Code|false1}}
|-
| '''Summary'''
|Saves the Specifies how often a query plan of an XQuery expression as {{Code|will be evaluated.dot}} file in the current working directoryThe result is serialized only once, using and the [https://en.wikipedia.org/wiki/DOT_(graph_description_language) graph description language]measured times are averages of all runs. The output file This option can e.g. also be visualized with changed on [http:/[Command-Line Options#BaseX Standalone|command line]] via <code>-r</www.graphviz.org Graphviz]code>.
|}
=Serialization Options= =DOTCOMPACT==SERIALIZE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DOTCOMPACT SERIALIZE [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|Chooses a compact dot representationResults of XQuery expressions will be serialized if this option is turned on. For debugging purposes and performance measurements, this option can be set to {{Code|false}}. It can also be turned off on [[Command-Line Options#BaseX Standalone|command line]] via <code>-z</code>.
|}
=Other Options= ===AUTOFLUSHSERIALIZER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|AUTOFLUSH SERIALIZER [booleanparams]}}
|-
| '''Default'''
|{{Code|true}}''empty''
|-
| '''Summary'''
|Flushes database buffers to disk after each updateParameters for [[Serialization|serializing]] query results. The string must comply with the following rules:* Variable names and values must be separated by equality signs.* Multiple variables must be delimited by commas.* Commas in values must be duplicated. If this The option can also be used on [[Command-Line Options#BaseX Standalone|command line]] with the flag <code>-s</code>.|-| '''Examples'''|* <code>indent=no</code> : disables automatic indentation of XML nodes. This is set usually a good choice when working with [[Full-Text#Mixed Content|Mixed-Content Data]].* <code>encoding=US-ASCII,omit-xml-declaration=no</code> : sets the encoding to {{Code|falseUS-ASCII}}and prints the XML declaration.* <code>item-separator=, bulk operations (multiple ,</code> : separates serialized items by a single updates) will be evaluated faster. As a drawback, the chance of data loss increases if the database is not explicitly flushed via the {{Command|FLUSH}} commandcomma.
|}
===WRITEBACKEXPORTER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|WRITEBACK EXPORTER [booleanparams]}}
|-
| '''Default'''
|{{Code|false}}''empty''
|-
| '''Summary'''
|Propagates updates on main-memory instances Contains parameters for exporting resources of a database and writing files that have been retrieved after updates via [[Databases#XML Documentsthe {{Option|fn:doc]] WRITEBACK}} option. Keys and values are separated by equality signs, multiple parameters are delimited by commas. See [[Databases#XML Documents|fn:collectionSerialization]] back to diskfor more details. This option can also be activated on [[Command|-Line Options#BaseX Standalone|command line]] via '''Examples'''|* <code>indent=no,omit-uxml-declaration=no</code>. Please note that: disables automatic indentation of XML nodes, when turning this option on, your original files will not be backed upoutputs the XML declaration.
|}
===XMLPLAN=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|XMLPLAN [boolean]}}|-| '''Default'''|{{Code|false}}|-| '''Summary'''|Prints the execution plan of an XQuery expression in its XML representation. This option can also be activated on [[Command-Line Options#BaseX Standalone|command line]] via <code>-x</code>. |} ===COMPPLAN=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|COMPPLAN [boolean]}}|-| '''Default'''|{{Code|true}}|-| '''Summary'''|Generates the query plan, which can be activated via {{Option|XMLPLAN}}, before or after query compilation. This option can also be activated on [[Command-Line Options#BaseX Standalone|command line]] via <code>-X</code>. |} ===FULLPLAN=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|FULLPLAN [boolean]}}|-| '''Default'''|{{Code|false}}|-| '''Summary'''|Attaches the file path, line and column of the expressions in the original query string to the query plan. Values (items and sequences) have no input information attached.|} =Other Options= ===AUTOFLUSH=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|AUTOFLUSH [boolean]}}|-| '''Default'''|{{Code|true}}|-| '''Summary'''|Flushes database buffers to disk after each update. If this option is set to {{Code|false}}, bulk operations (multiple single updates) will be evaluated faster. As a drawback, the chance of data loss increases if the database is not explicitly flushed via the {{Command|FLUSH}} command.|} ===WRITEBACK=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|WRITEBACK [boolean]}}|-| '''Default'''|{{Code|false}}|-| '''Summary'''|Propagates updates on main-memory instances of files that have been retrieved via [[Databases#XML Documents|fn:doc]] and [[Databases#XML Documents|fn:collection]] back to disk:* This option can also be activated on [[Command-Line Options#BaseX Standalone|command line]] via <code>-u</code>.* Please take in mind that no backup will be created from your original files.* The serialization options can be controlled via the {{Option|EXPORTER}} option.|} ===MAXSTAT=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|MAXSTAT [num]}}|-| '''Default'''|{{Code|30}}|-| '''Summary'''|Specifies the maximum number of index occurrences printed by the {{Command|INFO INDEX}} command.|} =Changelog= ;Version 9.6* Added: {{Option|UNROLLLIMIT}}, {{Option|WRAPJAVA}} ;Version 9.5* Updated: {{Option|INLINELIMIT}}: default reduced to 50.* Updated: {{Option|RESTXQERRORS}}: additionally suppress stack trace in HTTP response ;Version 9.4* Added: {{Option|LOGTRACE}} ;Version 9.3* Added: {{Option|WITHDB}}, {{Option|GZIP}} ;Version 9.2* Added: {{Option|RESTXQERRORS}}, {{Option|FULLPLAN}}* Removed: <code>DOTPLAN</code>, <code>DOTCOMPACT</code>
{| width='100%';Version 9.0|-| width='120' | '''Signature'''|* Added: {{CodeOption|MAXSTAT [num]ENFORCEINDEX}}|-| '''Default'''|, {{CodeOption|30COPYNODE}}|-| '''Summary'''|Specifies the maximum number of index occurrences printed by the , {{CommandOption|INFO INDEX}IGNOREHOSTNAME} command.|}
=Changelog=;Version 8.6* Added: {{Option|FAIRLOCK}}, {{Option|PARSERESTXQ}}* Removed: {{Code|GLOBALLOCK}} (exclusive use of database lock)* Removed: {{Code|QUERYPATH}} (will now be internally assigned)* Removed: {{Code|CACHERESTXQ}} (replaced with PARSERESTXQ)
;Version 8.5
 * Added: {{Option|ASYNCTIMEOUTCACHETIMEOUT}}, {{Option|LOGPATH}}
* Updated: {{Option|AUTHMETHOD}}: {{Code|custom}} value added.
;Version 8.4
 
* Added: {{Option|TOKENINDEX}}, {{Option|TOKENINCLUDE}}
* Added: {{Option|SPLITSIZE}} (replacing <code>INDEXSPLITSIZE</code> and <code>FTINDEXSPLITSIZE</code>)
;Version 8.3
 
* Added: {{Option|CACHERESTXQ}}, {{Option|TEXTINCLUDE}}, {{Option|ATTRINCLUDE}}, {{Option|FTINCLUDE}}, {{Option|ARCHIVENAME}}
;Version 8.2
 
* Removed: <code>EVENTPORT</code>, <code>CACHEQUERY</code>
;Version 8.1
 
* Added: {{Option|IGNORECERT}}, {{Option|RESTPATH}}
;Version 8.0
 
* Added: {{Option|MIXUPDATES}}, {{Option|AUTOOPTIMIZE}}, {{Option|AUTHMETHOD}}, {{Option|XINCLUDE}}
* Updated: {{Option|PROXYPORT}}: default set to 0; will be ignored. {{Option|PROXYHOST}}, {{Option|NONPROXYHOSTS}}: empty strings will be ignored.
;Version 7.7
 
* Added: {{Option|ADDCACHE}}, {{Option|CHECKSTRINGS}}, {{Option|FTINDEXSPLITSIZE}}, {{Option|INDEXSPLITSIZE}}
;Version 7.6
 
* Added: {{Option|GLOBALLOCK}}
* Added: store local options in configuration file after {{Code|# Local Options}} comments.
;Version 7.5
 
* Added: options can now be set via system properties
* Added: a pragma expression can be used to locally change database options
;Version 7.3
 
* Updated: {{Option|KEEPALIVE}}, {{Option|TIMEOUT}}: default values changed
* Removed: {{Code|WILDCARDS}}; new index supports both fuzzy and wildcard queries
;Version 7.2
 
* Added: {{Option|PROXYHOST}}, {{Option|PROXYPORT}}, {{Option|NONPROXYHOSTS}}, {{Option|HTMLOPT}}
* Updated: {{Option|TIMEOUT}}: ignore timeout for admin users
;Version 7.1
 
* Added: {{Option|ADDRAW}}, {{Option|MAXLEN}}, {{Option|MAXCATS}}, {{Option|UPDINDEX}}
* Updated: {{Option|BINDINGS}}
;Version 7.0
 
* Added: {{Option|SERVERHOST}}, {{Option|KEEPALIVE}}, {{Option|AUTOFLUSH}}, {{Option|QUERYPATH}}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu