Changes

Jump to navigation Jump to search
106 bytes added ,  08:23, 20 July 2022
no edit summary
# Local Options
CHOP CATALOG = falseetc/w3-catalog.xml
</syntaxhighlight>
<syntaxhighlight lang="perl">
java -Dorg.basex.CHOPCATALOG=false etc/w3-catalog.xml -cp basex.jar org.basex.BaseX -c"get chopSHOW OPTIONS catalog"CHOPCATALOG: falseetc/w3-catalog.xml
</syntaxhighlight>
* If using the Mac OS X packaged application then is used, global options can be set within the Info.plist file within the Contents folder of the application package. For example:
<syntaxhighlight lang="xml">
<key>JVMOptions</key>
<array>
<string>-Dorg.basex.CHOPCATALOG=falseetc/w3-catalog.xml</string>
</array>
</syntaxhighlight>
<syntaxhighlight lang="xml">
<context-param>
<param-name>org.basex.chopcatalog</param-name> <param-value>falseetc/w3-catalog.xml</param-value>
</context-param>
</syntaxhighlight>
==XML Parsing==
===CHOPSTRIPWS=== {{Announce|Updated with Version 10:}} Renamed (before: {{Code|CHOP}}), new default: {{Code|false}}.
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CHOP STRIPWS [boolean]}}
|-
| '''Default'''
|{{Code|truefalse}}
|-
| '''Summary'''
|Many XML documents include whitespaces that have been added to improve readability. This option controls the [https://www.w3.org/TR/REC-xml/#sec-white-space white-space processing mode] of the XML parser:
* With If the default value option is set to {{Code|true}}, leading and trailing whitespaces from text nodes will be chopped stripped, and all empty text nodes will be discarded.* The flag should be turned off disabled if a document contains [[Full-Text#Mixed Content|mixed content]].* The flag can also be turned off on via the [[Command-Line Options#BaseX Standalone|command line]] via and <code>-w</code>.* If the option is enabled, whitespaces of an element and its descendants can locally be preserved with the <code>xml:space="preserve"</code> attribute is 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|text}} element will not be chopped:
<syntaxhighlight lang="xml">
<xml>
<title>
Demonstrating the CHOP STRIPWS flag
</title>
<text xml:space="preserve">To <b>be</b>, or not to <b>be</b>, that is the question.</text>
</xml>
</syntaxhighlight>
It is recommendable to additionally assign If whitespaces are stripped, <code>indent=noyes</code> can be assigned to the {{Option|SERIALIZER}} option; otherwise the serialized documents will automatically be to get properly indentedXML output.
|}
|-
| '''Summary'''
|Strips all namespaces from an XML document and all elements while parsing.
|}
* Removed: <code>COMPPLAN</code>, <code>IGNOREHOSTNAME</code>
* Updated: {{Option|IGNORECERT}}: Additionally disable hostname verification.
* Updated: {{Option|CATALOG}}: Renamed from <code>{{Code|CATFILE</code>}}.* Updated: {{Option|STRIPWS}}: Renamed from {{Code|CHOP}}.
;Version 9.7
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu