Changes

Jump to navigation Jump to search
7,952 bytes added ,  27 May
m
Fixed typo if should be is
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=== {{Mark|Updated with BaseX 9.5:}} Additionally suppress stack trace in HTTP response.
{| 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 the [[Startup#BaseX HTTP Server|HTTP Server]] can be locally closed:* The listener for stopping RESTXQ directory and returns the web server will only be started if full error message and stack trace to 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== ===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'''|''empty''|-| '''Summary'''|If a text file with stop words is specified, frequently used terms contained in that file will be ignored when a full-text index is created. A stopword list may decrease the size of the full text index and speed up your queries. See [[Indexes#Full-Text Index|Full-Text Index]] for more details.|} =Query Options= ===QUERYINFO=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|QUERYINFO [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|Allows queries to both contain updating and non-updating expressions. All updating constraints will be turned offPrints more information on internal query rewritings, optimizations, and nodes to be returned will be copied before they are modified by an updating expressionperformance. By default, this option info is set to {{Codeshown in the [[GUI#Visualizations|false}}, because Info View]] in the XQuery Update Facility does not allow an updating query to GUI. It can also be activated on [[XQuery UpdateCommand-Line Options#Returning ResultsBaseX Standalone|return resultscommand line]]via <code>-V</code>.
|}
===BINDINGSMIXUPDATES===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|BINDINGS [vars]MIXUPDATES}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''Summary'''
|Allows queries to both contain updating and non-updating expressions. All updating constraints will be turned off, and nodes to be returned will be copied before they are modified by an updating expression. By default, in compliance with the XQuery Update Facility, this option is set to {{Code|false}}. See [[XQuery Update#Returning Results|Returning Results]] for more details.|} ===BINDINGS=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|BINDINGS [vars]}}|-| '''Default'''|''empty''|-| '''Summary'''|Contains external variables to be bound to a query. 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 leading dollar sign.
* 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].
This option can also be used on [[Command-Line Options#BaseX Standalone|command line]] with the flag <code>-b</code>.
|-
* <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 {{Code|$GREETING}}:<pre classsyntaxhighlight lang="brush:xmlxquery">
SET BINDINGS GREETING="hello world!"
XQUERY declare variable $GREETING external; $GREETING
</presyntaxhighlight>
|}
===QUERYPATHINLINELIMIT=== {{Mark|Updated with Version 9.5:}} default reduced to 50.
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|QUERYPATH [path]INLINELIMIT}}
|-
| '''Default'''
|''empty''{{Code|50}}
|-
| '''Summary'''
|Contains the path (''base URI'') This option controls inlining of XQuery functions:* The XQuery compiler inlines functions to the executed speed up query evaluation.* Inlining will only take place if a function body is not too large (default: ''empty''i.e., if it does not contain too many expressions). This directory will * With this option, this maximum number of expressions can be specified.* Function inlining can be used turned off by setting the value to resolve relative paths {{Code|0}}.* The limit can be locally overwritten via the [[XQuery Extensions#Function Inlining|%basex:inline]] annotation (follow the link to documents, query modules, and other resources addressed in a queryget more information on function inlining).
|}
===INLINELIMITUNROLLLIMIT=== {{Mark|Introduced with Version 9.6:}}
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|INLINELIMITUNROLLLIMIT}}
|-
| '''Default'''
|{{Code|1005}}
|-
| '''Summary'''
|The This option controls the unroll limit:* Loops with few iterations are ''unrolled'' by the XQuery compiler inlines functions to speed up query evaluationenable further optimizations. Inlining * If the limit is increased, more optimizations will only take place if a function body is not too large (i.e., if it does not contain too many expressions). With this option, this maximum number of expressions can be specified.<br/>Function inlining can be turned off by setting but the value to {{Code|0}}memory consumption and compile time will increase. The limit can be locally overridden via the <code>* See [[XQuery_3.0XQuery Optimizations#AnnotationsLoop Unrolling|%basex:inlineLoop Unrolling]]</code> annotationfor more details.
|}
===TAILCALLSENFORCEINDEX===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TAILCALLSENFORCEINDEX [boolean]}}
|-
| '''Default'''
|{{Code|256false}}
|-
| '''Summary'''
|Specifies how many stack frames of Enforces index rewritings in path expressions. See [http://en.wikipedia.org/wiki/Tail_call tail-calls[Indexes#Enforce Rewritings|Enforce Rewritings]] are allowed on the stack at any time. When this limit is reached, tail-call optimization takes place and some call frames are eliminated. The feature can be turned off by setting the value to {{Code|-1}}for details.
|}
===DEFAULTDBCOPYNODE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DEFAULTDBCOPYNODE [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|If this option is turned on, paths specified When creating new nodes in the XQuery via [[Databases#XML Documents|fnhttps:doc]] and [[Databases//www.w3.org/TR/xquery-31/#XML Documents|fn:collectionid-constructors Node Constructors]] functions , all enclosed nodes will first be resolved against a database that has been opened in the global context outside the query (ecopied, and all resulting nodes will get new node identities.gThis step can be very expensive, and it can be disabled with this option. by The option should be used carefully, as it changes the {{Command|OPEN}} command)standard behavior of XQuery. If the path does not match any existing resources, it will It should preferrably be resolved as described used in the article on [[DatabasesXQuery Extensions#Access ResourcesDatabase Pragmas|accessing database resourcesPragmas]].
|}
===FORCECREATETAILCALLS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|FORCECREATE [boolean]TAILCALLS}}
|-
| '''Default'''
|{{Code|false256}}
|-
| '''Summary'''
|By activating Specifies how many stack frames of [https://en.wikipedia.org/wiki/Tail_call tail-calls] are allowed on the stack at any time. When this optionlimit is reached, database instances will tail-call optimization takes place and some call frames are eliminated. The feature can be created with turned off by setting the XQuery functions [[Databases#XML Documentsvalue to {{Code|fn:doc]] and [[Databases#XML Documents|fn:collection]]-1}}.
|}
===CHECKSTRINGSWITHDB===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CHECKSTRINGS [boolean]WITHDB}}
|-
| '''Default'''
|-
| '''Summary'''
|By default, characters from external sources that are invalid in XML will trigger an error. If the option is set to <code>false</code>, these characters will be replaced with <code>\xFFFD</code>. The option affects [[Java Bindings]] and the string conversion and input functions resources specified via [[Archive ModuleDatabases#archive:createXML Documents|archivefn:createdoc]], and [[Archive ModuleDatabases#archive:extract-textXML Documents|archivefn:extract-textcollection]], [[Archive Module#archive:updateare looked up both in the database and in the file system. If you always use {{Function|archive:update]], [[Conversion Module#convert:binary-to-stringDatabase|convertdb:binary-open}} to-string]]access databases, [[Fetch Module#fetchit is recommendable to disable this option:text|fetch:text]], * No locks will be created for the two functions (see [[File ModuleTransaction Management#file:read-textLimitations|file:read-textlimitations of database locking]]for more details).* Access to local and external resources will be faster, and [[ZIP Module#zip:text-entry|zip:text-entry]]as the database lookup will be skipped.
|}
===LSERRORDEFAULTDB===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|LSERROR [error]DEFAULTDB}}
|-
| '''Default'''
|{{Code|0false}}
|-
| '''Summary'''
|This If this option specifies is turned on, paths specified in the maximum Levenshtein error for [[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 (e.g. by the BaseX-specific fuzzy {{Command|OPEN}} command). If the path does not match option. See any existing resources, it will be resolved as described in the page article on [[Full-TextDatabases#Fuzzy_QueryingAccess Resources|Full-Textsaccessing database resources]] for more information on fuzzy querying.
|}
===RUNQUERYFORCECREATE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RUNQUERY FORCECREATE [boolean]}}
|-
| '''Default'''
|{{Code|truefalse}}
|-
| '''Summary'''
|Specifies if a query By activating this option, database instances will be executed or parsed only. This option can also be changed on created with the XQuery functions [[Databases#XML Documents|fn:doc]] and [[Command-Line OptionsDatabases#BaseX StandaloneXML Documents|command linefn:collection]] via <code>-R</code>.
|}
===RUNSCHECKSTRINGS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RUNS CHECKSTRINGS [numboolean]}}
|-
| '''Default'''
|{{Code|1true}}
|-
| '''Summary'''
|Specifies how often a query By default, characters from external sources that are invalid in XML will be evaluatedtrigger an error. The result If the option is serialized only onceset to <code>false</code>, and these characters will be replaced with the measured times are averages of all runsUnicode replacement character <code>FFFD</code> (&#xFFFD;). This The option can also be changed on affects [[Java Bindings]] and string conversion and input functions such as [[Archive Module#archive:create|archive:create]], [[CommandArchive Module#archive:extract-text|archive:extract-Line Optionstext]], [[Archive Module#BaseX Standalonearchive:update|command linearchive:update]] via <code>, and [[ZIP Module#zip:text-entry|zip:text-r</code>entry]].
|}
=Serialization Options= ===SERIALIZELSERROR===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|SERIALIZE LSERROR [booleanerror]}}
|-
| '''Default'''
|{{Code|true0}}
|-
| '''Summary'''
|Results of XQuery expressions will be serialized if this This option is turned onspecifies the maximum Levenshtein error for fuzzy full-text matching. For debugging purposes and performance measurementsBy default, this option can be set to if {{Code|false0}}is assigned, the error value is calculated dynamically. It can also be turned off on See [[CommandFull-Line OptionsText#BaseX StandaloneFuzzy_Querying|command lineFuzzy Querying]] via <code>-z</code>for more details.
|}
===SERIALIZERRUNQUERY===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|SERIALIZER RUNQUERY [paramsboolean]}}
|-
| '''Default'''
|''empty''{{Code|true}}
|-
| '''Summary'''
|Parameters for [[Serialization|serializing]] Specifies if a query results. The string must comply with the following rules:* Variable names and values must will be separated by equality signsexecuted or parsed only.* Multiple variables must be delimited by commas.* Commas in values must be duplicated.The This option can also be used changed on [[Command-Line Options#BaseX Standalone|command line]] with the flag <code>-s</code>.|-| '''Examples'''|* via <code>encoding=US-ASCII,omit-xml-declaration=noR</code> : sets the encoding to {{Code|US-ASCII}} and prints the XML declaration.* <code>item-separator=,,</code> : separates serialized items by a single comma.
|}
===EXPORTERRUNS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|EXPORTER RUNS [paramsnum]}}
|-
| '''Default'''
|''empty''{{Code|1}}
|-
| '''Summary'''
|Contains parameters for exporting all resources of Specifies how often a databasequery will be evaluated. Keys The result is serialized only once, and values the measured times are separated by equality signs, multiple parameters are delimited by commasaverages of all runs. See This option can also be changed on [[SerializationCommand-Line Options#BaseX Standalone|command line]] for more detailsvia <code>-r</code>.
|}
=Serialization Options= =XMLPLAN==SERIALIZE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|XMLPLAN SERIALIZE [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|Prints the execution plan Results of an XQuery expression in its XML representationexpressions will be serialized if this option is turned on. This For debugging purposes and performance measurements, this option can be set to {{Code|false}}. It can also be activated turned off on [[Command-Line Options#BaseX Standalone|command line]] via <code>-xz</code>.
|}
===COMPPLANSERIALIZER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|COMPPLAN SERIALIZER [booleanparams]}}
|-
| '''Default'''
|{{Code|true}}''empty''
|-
| '''Summary'''
|Generates Parameters for [[Serialization|serializing]] query results. The string must comply with the query plan, which can following rules:* Variable names and values must be separated by equality signs.* Multiple variables must be delimited by commas.* Commas in values must be activated via {{Option|XMLPLAN}}, before or after query compilationduplicated. This The option can also be activated used on [[Command-Line Options#BaseX Standalone|command line]] via with the flag <code>-s</code>.|-| '''Examples'''|* <code>indent=no</code> : disables automatic indentation of XML nodes. This is 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|US-XASCII}} and prints the XML declaration.* <code>item-separator=,,</code>: separates serialized items by a single comma.
|}
===DOTPLANEXPORTER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DOTPLAN EXPORTER [booleanparams]}}
|-
| '''Default'''
|{{Code|false}}''empty''
|-
| '''Summary'''
|Saves Contains parameters for exporting resources of a database and writing files after updates via the query plan of an XQuery expression as {{CodeOption|.dotWRITEBACK}} file in the current working directoryoption. Keys and values are separated by equality signs, using the multiple parameters are delimited by commas. See [[https://enSerialization]] for more details.wikipedia.org/wiki|-| '''Examples'''|* <code>indent=no,omit-xml-declaration=no</DOT_(graph_description_language) graph description language]. The output file can e.g. be visualized with [httpcode> ://www.graphviz.org Graphviz]disables automatic indentation of XML nodes, outputs the XML declaration.
|}
===DOTCOMPACTXMLPLAN=== {| 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|DOTCOMPACT FULLPLAN [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|Chooses a compact dot representationAttaches 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.
|}
|-
| '''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 note take in mind that, when turning this option on, no backup will be created from your original files will not .* The serialization options can be backed upcontrolled 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==MAXSTAT=== ;Version 9.6* Added: {{Option|UNROLLLIMIT}} ;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}}
administrator, editor
4

edits

Navigation menu