Changes

Jump to navigation Jump to search
84 bytes removed ,  18:39, 1 December 2023
m
Text replacement - "syntaxhighlight" to "pre"
* The {{Code|.basex}} [[Configuration#Configuration Files|configuration file]] is parsed by every new local BaseX instance. It contains all global options. Local options can be specified at the end of the file after the {{Code|Local Options}} comment:
<syntaxhighlight pre lang="perl">
# General Options
DEBUG = false
* Initial values for global options can also be specified via system properties, which can be passed on with the [https://docs.oracle.com/en/java/javase/11/tools/java.html -D flag] on the command line, or with [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 pre lang="perl">
java -Dorg.basex.CATALOG=etc/w3-catalog.xml -cp basex.jar org.basex.BaseX -c"SHOW OPTIONS catalog"
CATALOG: etc/w3-catalog.xml
* If the Mac OS X packaged application is used, global options can be set within the Info.plist file within the Contents folder of the application package. For example:
<syntaxhighlight pre lang="xml">
<key>JVMOptions</key>
<array>
* In a [[Web Application]], the default can be adjusted in the {{Code|web.xml}} file as follows:
<syntaxhighlight pre lang="xml">
<context-param>
<param-name>org.basex.catalog</param-name>
* If the option is enabled, whitespaces of an element and its descendants can locally be preserved with the <code>xml:space="preserve"</code> attribute:
<syntaxhighlight pre lang="xml">
<xml>
<title>
* <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}}:
<syntaxhighlight pre lang="'xquery"'>
SET BINDINGS GREETING="hello world!"
XQUERY declare variable $GREETING external; $GREETING
| '''Summary'''
|When creating new nodes in XQuery via [https://www.w3.org/TR/xquery-31/#id-constructors Node Constructors], copies of all enclosed nodes are created, and the copied nodes get new node identities. As a result, the following query yields <code>false</code>:
<syntaxhighlight pre lang="'xquery"'>
let $a := <a/>
let $b := <b>{ $a }</b>
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu