/ .. / / -> download
.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "s1kd-validate" "1" "2021-04-16" "" "s1kd-tools"
.hy
.SH NAME
.PP
s1kd-validate - Validate S1000D CSDB objects against their schemas
.SH SYNOPSIS
.IP
.nf
\f[C]
s1kd-validate [-s <path>] [-x <URI>] [-F|-f] [-eloqv\[ha]h?]
              [<object>...]
\f[R]
.fi
.SH DESCRIPTION
.PP
The \f[I]s1kd-validate\f[R] tool validates S1000D CSDB objects, checking
whether they are valid XML files and if they are valid against their own
S1000D schemas.
.SH OPTIONS
.TP
-e, --ignore-empty
Ignore validation for empty or non-XML documents.
.TP
-F, --valid-filenames
List valid files.
.TP
-f, --filenames
List invalid files.
.TP
-h, -?, --help
Show help/usage message.
.TP
-l, --list
Treat input as a list of object names to validate, rather than an object
itself.
.TP
-o, --output-valid
Output valid CSDB objects to stdout.
.TP
-q, --quiet
Quiet mode.
The tool will not output anything to stdout or stderr.
Success/failure will only be indicated through the exit status.
.TP
-s, --schema <path>
Validate the objects against the specified schema, rather than the one
that they reference.
.TP
-v, --verbose
Verbose mode.
Success/failure will be explicitly reported on top of any errors.
.TP
-x, --exclude <URI>
Exclude an XML namespace from the validation.
Elements in the namespace specified by <URI> are ignored.
.TP
-\[ha], --remove-deleted
Validate with elements that have a change type of \[dq]delete\[dq]
removed.
.TP
--version
Show version information.
.TP
<object>...
Any number of CSDB objects to validate.
If none are specified, input is read from stdin.
.PP
In addition, the following options allow configuration of the XML
parser:
.TP
--dtdload
Load the external DTD.
.TP
--huge
Remove any internal arbitrary parser limits.
.TP
--net
Allow network access to load external DTD and entities.
.TP
--noent
Resolve entities.
.TP
--parser-errors
Emit errors from parser.
.TP
--parser-warnings
Emit warnings from parser.
.TP
--xinclude
Do XInclude processing.
.TP
--xml-catalog <file>
Use an XML catalog when resolving entities.
Multiple catalogs may be loaded by specifying this option multiple
times.
.SS XML catalogs
.PP
XML catalogs allow redirecting the canonical URIs of XML schemas and
other external resources to local files, so as to avoid the unnecessary
overhead of downloading those static resources over the Internet.
.PP
Below is an example of a catalog file which maps the S1000D schemas to a
local directory:
.IP
.nf
\f[C]
<catalog xmlns=\[dq]urn:oasis:names:tc:entity:xmlns:xml:catalog\[dq]>
<rewriteURI
uriStartString=\[dq]http://www.s1000d.org\[dq]
rewritePrefix=\[dq]/usr/share/s1kd/schemas\[dq]/>
</catalog>
\f[R]
.fi
.PP
This can be placed in a catalog file automatically loaded by libxml2
(e.g., \f[C]/etc/xml/catalog\f[R]) or saved to a file which is then
specified in an environment variable used by libxml2 (e.g.,
\f[C]XML_CATALOG_FILES\f[R]):
.IP
.nf
\f[C]
$ XML_CATALOG_FILES=catalog.xml s1kd-validate <DMs...>
\f[R]
.fi
.PP
Alternatively, the --xml-catalog option may be used:
.IP
.nf
\f[C]
$ s1kd-validate --xml-catalog=catalog.xml <DMs>...
\f[R]
.fi
.SH EXIT STATUS
.TP
0
No errors.
.TP
1
Some CSDB objects are not well-formed or valid.
.TP
2
The number of schemas cached exceeded the available memory.
.TP
3
A specified schema could not be read.
.SH EXAMPLE
.IP
.nf
\f[C]
$ s1kd-validate DMC-EX-A-00-00-00-00A-040A-D_000-01_EN-CA.XML
\f[R]
.fi
.SH AUTHORS
khzae.net.


/ gopher://khzae.net/0/s1000d/s1kd-tools/src/tools/s1kd-validate/doc/s1kd-validate.1
Styles: Light Dark Classic