7. Common options

-xi

When loading a document, transclude XInclude elements.

Default: XInclude elements are treated as any other element.

This option is equivalent to "-inclscheme com.xmlmind.xml.xinclude.XIncludeScheme".

-inclscheme class_name

When loading a document, transclude nodes specifying an inclusion directive belonging to specified inclusion scheme.

Default: nodes specifying an inclusion directive are treated as any other node.

Specifying several -inclscheme options is permitted. Mixing -xi and -inclscheme options is permitted.

-cache schema_cache_dir

Specifies the directory to be used as a schema cache. This directory is automatically created if it does not exist.

Default: do not cache schemas.

RELAX NG schemas can be cached only in memory and not on disk.

-rncencoding encoding

Specifies the encoding used for RELAX NG compact syntax schemas.

Default: do not cache schemas.

-v

Verbose.

Example: Transclude all XInclude elements contained docbook-modular-book.xml (-f is needed otherwise out.xml would contain a number of duplicate ID errors).

/opt/xxe/demo$ xmltool indent -xi -f -flat -o out.xml docbook-modular-book.xml

Example: Transclude all conref elements contained in topic1.dita.

/tmp$ xmltool indent -inclscheme "com.xmlmind.xmleditext.dita.ConrefScheme" \
    -f -flat -o out.dita topic1.dita 

Example: Validate docbook-table.xml. Cache the DocBook DTD if it is not already cached. If it is already cached, use the cached copy.

/opt/xxe/demo$ xmltool validate -cache /tmp/cache docbook-table.xml
/opt/xxe/demo$ ls /tmp/cache
directory.txt
docbookx.ser

Example: Validate mathml.pane against pane.rnc, a RELAX NG schema using the compact syntax, encoded in ISO-8859-1.

/opt/xxe/addon/mathml_config/common/pane$ xmltool validate \
    -rncencoding ISO-8859-1 -s pane.rnc mathml.pane