Commit 6464d6aa authored by Daniel Veillard's avatar Daniel Veillard
Browse files

man page improvements from Daniel Leidert, c.f. #331290 Daniel

* doc/xmllint.1 doc/xmllint.xml: man page improvements from Daniel
  Leidert, c.f. #331290
Daniel
parent ea71f5dd
Sun Feb 19 22:31:33 CET 2006 Daniel Veillard <daniel@veillard.com>
* doc/xmllint.1 doc/xmllint.xml: man page improvements from Daniel
Leidert, c.f. #331290
Sun Feb 19 17:54:04 CET 2006 Daniel Veillard <daniel@veillard.com>
 
* xmllint.c: fix an error report when using --path and --valid
......
......@@ -24,20 +24,30 @@ xmllint \- command line XML tool
.ad l
.hy 0
.HP 8
\fBxmllint\fR [\fB\-\-version\fR | \fB\-\-debug\fR | \fB\-\-shell\fR | \fB\-\-debugent\fR | \fB\-\-copy\fR | \fB\-\-recover\fR | \fB\-\-noent\fR | \fB\-\-noout\fR | \fB\-\-nonet\fR | \fB\-\-path\ \fIpaths\fR\fR | \fB\-\-load\-trace\fR | \fB\-\-htmlout\fR | \fB\-\-nowrap\fR | \fB\-\-valid\fR | \fB\-\-postvalid\fR | \fB\-\-dtdvalid\ \fIURL\fR\fR | \fB\-\-dtdvalidfpi\ \fIFPI\fR\fR | \fB\-\-timing\fR | \fB\-\-output\ \fIfile\fR\fR | \fB\-\-repeat\fR | \fB\-\-insert\fR | \fB\-\-compress\fR | \fB\-\-html\fR | \fB\-\-xmlout\fR | \fB\-\-push\fR | \fB\-\-memory\fR | \fB\-\-maxmem\ \fInbbytes\fR\fR | \fB\-\-nowarning\fR | \fB\-\-noblanks\fR | \fB\-\-nocdata\fR | \fB\-\-format\fR | \fB\-\-encode\ \fIencoding\fR\fR | \fB\-\-dropdtd\fR | \fB\-\-nsclean\fR | \fB\-\-testIO\fR | \fB\-\-catalogs\fR | \fB\-\-nocatalogs\fR | \fB\-\-auto\fR | \fB\-\-xinclude\fR | \fB\-\-noxincludenode\fR | \fB\-\-loaddtd\fR | \fB\-\-dtdattr\fR | \fB\-\-stream\fR | \fB\-\-walker\fR | \fB\-\-pattern\ \fIpatternvalue\fR\fR | \fB\-\-chkregister\fR | \fB\-\-relaxng\fR | \fB\-\-schema\fR | \fB\-\-c14n\fR] [\fB\fIxmlfile\fR\fR]
\fBxmllint\fR [\fB\fB\-\-version\fR\fR | \fB\fB\-\-debug\fR\fR | \fB\fB\-\-shell\fR\fR | \fB\fB\-\-debugent\fR\fR | \fB\fB\-\-copy\fR\fR | \fB\fB\-\-recover\fR\fR | \fB\fB\-\-noent\fR\fR | \fB\fB\-\-noout\fR\fR | \fB\fB\-\-nonet\fR\fR | \fB\fB\-\-path\ "\fIPATHS\fR"\fR\fR | \fB\fB\-\-load\-trace\fR\fR | \fB\fB\-\-htmlout\fR\fR | \fB\fB\-\-nowrap\fR\fR | \fB\fB\-\-valid\fR\fR | \fB\fB\-\-postvalid\fR\fR | \fB\fB\-\-dtdvalid\ \fIURL\fR\fR\fR | \fB\fB\-\-dtdvalidfpi\ \fIFPI\fR\fR\fR | \fB\fB\-\-timing\fR\fR | \fB\fB\-\-output\ \fIFILE\fR\fR\fR | \fB\fB\-\-repeat\fR\fR | \fB\fB\-\-insert\fR\fR | \fB\fB\-\-compress\fR\fR | \fB\fB\-\-html\fR\fR | \fB\fB\-\-xmlout\fR\fR | \fB\fB\-\-push\fR\fR | \fB\fB\-\-memory\fR\fR | \fB\fB\-\-maxmem\ \fINBBYTES\fR\fR\fR | \fB\fB\-\-nowarning\fR\fR | \fB\fB\-\-noblanks\fR\fR | \fB\fB\-\-nocdata\fR\fR | \fB\fB\-\-format\fR\fR | \fB\fB\-\-encode\ \fIENCODING\fR\fR\fR | \fB\fB\-\-dropdtd\fR\fR | \fB\fB\-\-nsclean\fR\fR | \fB\fB\-\-testIO\fR\fR | \fB\fB\-\-catalogs\fR\fR | \fB\fB\-\-nocatalogs\fR\fR | \fB\fB\-\-auto\fR\fR | \fB\fB\-\-xinclude\fR\fR | \fB\fB\-\-noxincludenode\fR\fR | \fB\fB\-\-loaddtd\fR\fR | \fB\fB\-\-dtdattr\fR\fR | \fB\fB\-\-stream\fR\fR | \fB\fB\-\-walker\fR\fR | \fB\fB\-\-pattern\ \fIPATTERNVALUE\fR\fR\fR | \fB\fB\-\-chkregister\fR\fR | \fB\fB\-\-relaxng\ \fISCHEMA\fR\fR\fR | \fB\fB\-\-schema\ \fISCHEMA\fR\fR\fR | \fB\fB\-\-c14n\fR\fR] {\fIXML\-FILE(S)\fR...}
.ad
.hy
.ad l
.hy 0
.HP 8
\fBxmllint\fR \fB\-\-help\fR
.ad
.hy
.SH "INTRODUCTION"
.SH "DESCRIPTION"
.PP
The xmllint program parses one or more XML files, specified on the command line as \fIxmlfile\fR (or the standard input if the filename provided is \- )\&. It prints various types of output, depending upon the options selected\&. It is useful for detecting errors both in XML code and in the XML parser itself\&.
The \fBxmllint\fR program parses one or more XML files, specified on the command line as \fIXML\-FILE\fR (or the standard input if the filename provided is \- )\&. It prints various types of output, depending upon the options selected\&. It is useful for detecting errors both in XML code and in the XML parser itself\&.
.PP
It is included in libxml2\&.
.SH "OPTIONS"
.TP
\fB\-\-help\fR
Print out a a short usage summary for \fBxmllint\fR\&.
.TP
\fB\-\-version\fR
Display the version of libxml2 used\&.
......@@ -64,7 +74,7 @@ Output any parsable portions of an invalid document\&.
.TP
\fB\-\-noent\fR
Substitute entity values for entity references\&. By default, xmllint leaves entity references in place\&.
Substitute entity values for entity references\&. By default, \fBxmllint\fR leaves entity references in place\&.
.TP
\fB\-\-nocdata\fR
......@@ -76,15 +86,15 @@ Remove redundant namespace declarations\&.
.TP
\fB\-\-noout\fR
Suppress output\&. By default, xmllint outputs the result tree\&.
Suppress output\&. By default, \fBxmllint\fR outputs the result tree\&.
.TP
\fB\-\-nonet\fR
Do not use the Internet to fetch DTD's or entities\&.
Do not use the Internet to fetch DTDs or entities\&.
.TP
\fB\-\-path\fR \fIpaths\fR
Use the list (separated by space or column) of filesystem path specified by \fIpaths\fR to load DTDs or entities \&.
\fB\-\-path\fR "\fIPATHS\fR"
Use the list (separated by space or colon) of filesystem path specified by \fIPATHS\fR to load DTDs or entities \&.
.TP
\fB\-\-load\-trace\fR
......@@ -92,15 +102,15 @@ Display to stderr all the documents loaded during the processing\&.
.TP
\fB\-\-htmlout\fR
Output results as an HTML file\&. This causes xmllint to output the necessary HTML tags surrounding the result tree output so the results can be displayed in a browser\&.
Output results as an HTML file\&. This causes \fBxmllint\fR to output the necessary HTML tags surrounding the result tree output so the results can be displayed in a browser\&.
.TP
\fB\-\-nowrap \fR
Do not output HTML doc wrapper\&.
.TP
\fB\-\-valid \fR
Determine if the document is a valid instance of the included Document Type Definition (DTD)\&. A DTD to be validated against also can be specified at the command line using the \fB\-\-dtdvalid\fR option\&. By default, xmllint also checks to determine if the document is well\-formed\&.
\fB\-\-valid\fR
Determine if the document is a valid instance of the included Document Type Definition (DTD)\&. A DTD to be validated against also can be specified at the command line using the \fB\-\-dtdvalid\fR option\&. By default, \fBxmllint\fR also checks to determine if the document is well\-formed\&.
.TP
\fB\-\-postvalid\fR
......@@ -116,10 +126,10 @@ Use the DTD specified by the Public Identifier \fIFPI\fR for validation, note th
.TP
\fB\-\-timing\fR
Output information about the time it takes xmllint to perform the various steps\&.
Output information about the time it takes \fBxmllint\fR to perform the various steps\&.
.TP
\fB\-\-output\fR \fIfile\fR
\fB\-\-output\fR \fIFILE\fR
Define a file path where xmllint will save the result of parsing\&. Usually the programs build a tree and save it on stdout, with this option the result XML instance will be saved onto a file\&.
.TP
......@@ -151,8 +161,8 @@ Use the push mode of the parser\&.
Parse from memory\&.
.TP
\fB\-\-maxmem\fR \fInnbytes\fR
Test the parser memory support\&. \fInnbytes\fR is the maximum number of bytes the library is allowed to allocate\&. This can also be used to make sure batch processing of XML files will not exhaust the virtual memory of the server running them\&.
\fB\-\-maxmem\fR \fINNBYTES\fR
Test the parser memory support\&. \fINNBYTES\fR is the maximum number of bytes the library is allowed to allocate\&. This can also be used to make sure batch processing of XML files will not exhaust the virtual memory of the server running them\&.
.TP
\fB\-\-nowarning\fR
......@@ -164,19 +174,19 @@ Drop ignorable blank spaces\&.
.TP
\fB\-\-format\fR
Reformat and reindent the output\&. The $XMLLINT_INDENT environment variable controls the indentation (default value is two spaces " ")\&.
Reformat and reindent the output\&. The \fBXMLLINT_INDENT\fR environment variable controls the indentation (default value is two spaces " ")\&.
.TP
\fB\-\-testIO\fR
Test user input/output support\&.
.TP
\fB\-\-encode\fR \fIencoding\fR
\fB\-\-encode\fR \fIENCODING\fR
Output in the given encoding\&.
.TP
\fB\-\-catalogs\fR
Use the catalogs from $SGML_CATALOG_FILES\&. Otherwise /etc/xml/catalog is used by default\&.
Use the catalogs from \fBSGML_CATALOG_FILES\fR\&. Otherwise \fI/etc/xml/catalog\fR is used by default\&.
.TP
\fB\-\-nocatalogs\fR
......@@ -208,7 +218,7 @@ Remove DTD from output\&.
.TP
\fB\-\-stream\fR
Use streaming API \- useful when used in combination with \-\-relaxng or \-\-valid options for validation of files that are too large to be held in memory\&.
Use streaming API \- useful when used in combination with \fB\-\-relaxng\fR or \fB\-\-valid\fR options for validation of files that are too large to be held in memory\&.
.TP
\fB\-\-walker\fR
......@@ -219,25 +229,25 @@ Test the walker module, which is a reader interface but for a document tree, ins
Turn on node registration\&. Useful for developers testing libxml2 node tracking code\&.
.TP
\fB\-\-pattern\fR \fIpatternvalue\fR
\fB\-\-pattern\fR \fIPATTERNVALUE\fR
Used to exercise the pattern recognition engine, which can be used with the reader interface to the parser\&. It allows to select some nodes in the document based on an XPath (subset) expression\&. Used for debugging\&.
.TP
\fB\-\-relaxng\fR \fIschema\fR
Use RelaxNG file named \fIschema\fR for validation\&.
\fB\-\-relaxng\fR \fISCHEMA\fR
Use RelaxNG file named \fISCHEMA\fR for validation\&.
.TP
\fB\-\-schema\fR \fIschema\fR
Use a W3C XML Schema file named \fIschema\fR for validation\&.
\fB\-\-schema\fR \fISCHEMA\fR
Use a W3C XML Schema file named \fISCHEMA\fR for validation\&.
.TP
\fB\-\-c14n\fR
Use the W3C XML Canonicalisation (C14N) to serialize the result of parsing to stdout\&. It keeps comments in the result\&.
.SH "SHELL"
.SH "SHELL COMMANDS"
.PP
xmllint offers an interactive shell mode invoked with the \fB\-\-shell\fR command\&. Available commands in shell mode include:
\fBxmllint\fR offers an interactive shell mode invoked with the \fB\-\-shell\fR command\&. Available commands in shell mode include:
.TP
\fBbase\fR
......@@ -248,19 +258,19 @@ display XML base of the node
leave shell
.TP
\fBcat \fInode\fR\fR
\fBcat \fINODE\fR\fR
Display node if given or current node\&.
.TP
\fBcd \fIpath\fR\fR
Change the current node to \fIpath\fR (if given and unique) or root if no argument given\&.
\fBcd \fIPATH\fR\fR
Change the current node to \fIPATH\fR (if given and unique) or root if no argument given\&.
.TP
\fBdir \fIpath\fR\fR
\fBdir \fIPATH\fR\fR
Dumps information about the node (namespace, attributes, content)\&.
.TP
\fBdu \fIpath\fR\fR
\fBdu \fIPATH\fR\fR
Show the structure of the subtree under path or the current node\&.
.TP
......@@ -276,12 +286,12 @@ Show this help\&.
Display memory usage\&.
.TP
\fBload \fIname\fR\fR
\fBload \fIFILENAME\fR\fR
Load a new document with the given name\&.
.TP
\fBls \fIpath\fR\fR
List contents of \fIpath\fR (if given) or the current directory\&.
\fBls \fIPATH\fR\fR
List contents of \fIPATH\fR (if given) or the current directory\&.
.TP
\fBpwd\fR
......@@ -292,70 +302,81 @@ Display the path to the current node\&.
Leave the shell\&.
.TP
\fBsave \fIname\fR\fR
Saves the current document to \fIname\fR if given or to the original name\&.
\fBsave \fIFILENAME\fR\fR
Saves the current document to \fIFILENAME\fR if given or to the original name\&.
.TP
\fBvalidate\fR
Check the document for error\&.
.TP
\fBwrite \fIname\fR\fR
\fBwrite \fIFILENAME\fR\fR
Write the current node to the given filename\&.
.SH "CATALOGS"
.SH "ENVIRONMENT"
.PP
Catalog behavior can be changed by redirecting queries to the user's own set of catalogs\&. This can be done by setting the \fIXML_CATALOG_FILES\fR environment variable to a list of catalogs\&. An empty one should deactivate loading the default \fI/etc/xml/catalog\fR default catalog\&.
On the completion of execution, \fBxmllint\fR returns the following error codes:
.SH "DEBUGGING CATALOGS"
.TP
\fBSGML_CATALOG_FILES\fR
\&.\&.\&.
.PP
Setting the environment variable \fIXML_DEBUG_CATALOG\fR using the command \fB"export XML_DEBUG_CATALOG="\fR outputs debugging information related to catalog operations\&.
.TP
\fBXML_CATALOG_FILES\fR
Catalog behavior can be changed by redirecting queries to the user's own set of catalogs\&. This can be done by setting the \fBXML_CATALOG_FILES\fR environment variable to a list of catalogs\&. An empty one should deactivate loading the default \fI/etc/xml/catalog\fR default catalog\&.
.TP
\fBXML_DEBUG_CATALOG\fR
Setting the environment variable \fBXML_DEBUG_CATALOG\fR using the command \fB"export XML_DEBUG_CATALOG="\fR outputs debugging information related to catalog operations\&.
.TP
\fBXMLLINT_INDENT\fR
\&.\&.\&.
.SH "ERROR RETURN CODES"
.SH "DIAGNOSTICS"
.PP
On the completion of execution, Xmllint returns the following error codes:
On the completion of execution, \fBxmllint\fR returns the following error codes:
.TP
0
\fB0\fR
No error
.TP
1
\fB1\fR
Unclassified
.TP
2
\fB2\fR
Error in DTD
.TP
3
\fB3\fR
Validation error
.TP
4
\fB4\fR
Validation error
.TP
5
\fB5\fR
Error in schema compilation
.TP
6
\fB6\fR
Error writing output
.TP
7
Error in pattern (generated when [\-\-pattern] option is used)
\fB7\fR
Error in pattern (generated when \fB\-\-pattern\fR option is used)
.TP
8
Error in Reader registration (generated when [\-\-chkregister] option is used)
\fB8\fR
Error in Reader registration (generated when \fB\-\-chkregister\fR option is used)
.TP
9
\fB9\fR
Out of memory error
.SH AUTHORS
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment