Options

The following commands are used to modify the default behaviour of the XML parser or XSH itself. Some of the commands are switch between two different modes according to a given expression (which is expected to result either in zero or non-zero value). Other commands also working as a flip-flop have their own explicit counterpart (e.g. verbose and quiet or debug and nodebug). This misconsistency is due to historical reasons.

The encoding and query-encoding options allow to specify character encoding that should be expected from user as well as the encoding to be used by XSH on output. This is particularly useful when you work with UTF-8 encoded documents on a console which supports only 8-bit characters.

The options command displays current settings by means of XSH commands. Thus it can not only be used to review current values, but also to store them future use, e.g. in ~/.xshrc file.

xsh> options | cat > ~/.xshrc

Related Argument Types and Commands

backups

turn on backup file creation

debug

display many annoying debugging messages

empty-tags

turn on/off serialization of empty tags

enc-string

character encoding (codepage) identifier

encoding

choose output charset

indent

turn on/off pretty-printing

keep-blanks

turn on/off ignorable whitespace preservation

load-ext-dtd

turn on/off external DTD fetching

nobackups

turn off backup file creation

nodebug

turn off debugging messages

options

list current settings using XSH syntax

parser-completes-attributes

turn on/off parser's ability to fill default attribute values

parser-expands-entities

turn on/off parser's tendency to expand entities

parser-expands-xinclude

turn on/off transparent XInclude insertion by parser

pedantic-parser

make the parser more pedantic

query-encoding

declare the charset of XSH source files and terminal input

quiet

turn off many XSH messages

recovering

turn on/off parser's ability to fix broken XML

register-function

define XPath extension function (EXPERIMENTAL)

register-namespace

register namespace prefix to use XPath expressions

register-xhtml-namespace

register XHTML namespace prefix to use XPath expressions

register-xsh-namespace

register XSH namespace prefix to use XPath expressions

run-mode

switch into normal execution mode (quit test-mode)

skip-dtd

turn on/off serialization of DTD DOCTYPE declaration

switch-to-new-documents

set on/off changing current document to newly open/created files

test-mode

do not execute any command, only check the syntax

unregister-function

undefine extension function (EXPERIMENTAL)

unregister-namespace

unregister namespace prefix

validation

turn on/off validation in XML parser

verbose

make XSH print many messages

xpath-axis-completion

sets TAB completion for axes in xpath expressions in the interactive mode

xpath-completion

turn on/off TAB completion for xpath expressions in the interactive mode