Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 1 | .\" ** You probably do not want to edit this file directly ** |
| 2 | .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). |
| 3 | .\" Instead of manually editing it, you probably should edit the DocBook XML |
| 4 | .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. |
| 5 | .TH "XMLLINT" "1" "2006\-03\-05" "libxml2" "" |
| 6 | .\" disable hyphenation |
| 7 | .nh |
| 8 | .\" disable justification (adjust text to left margin only) |
| 9 | .ad l |
| 10 | .SH "NAME" |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 11 | xmllint \- command line XML tool |
| 12 | .SH "SYNOPSIS" |
MST 2004 John Fleck | e42ae6f | 2004-02-27 03:26:30 +0000 | [diff] [blame] | 13 | .HP 8 |
Daniel Veillard | 51698c7 | 2006-04-06 14:02:42 +0000 | [diff] [blame] | 14 | \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\ "\fR\fB\fIPATH(S)\fR\fR\fB"\fR \fB\-\-load\-trace\fR \fB\-\-htmlout\fR \fB\-\-nowrap\fR \fB\-\-valid\fR \fB\-\-postvalid\fR \fB\-\-dtdvalid\ \fR\fB\fIURL\fR\fR \fB\-\-dtdvalidfpi\ \fR\fB\fIFPI\fR\fR \fB\-\-timing\fR \fB\-\-output\ \fR\fB\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\ \fR\fB\fINBBYTES\fR\fR \fB\-\-nowarning\fR \fB\-\-noblanks\fR \fB\-\-nocdata\fR \fB\-\-format\fR \fB\-\-encode\ \fR\fB\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\ \fR\fB\fIPATTERNVALUE\fR\fR \fB\-\-chkregister\fR \fB\-\-relaxng\ \fR\fB\fISCHEMA\fR\fR \fB\-\-schema\ \fR\fB\fISCHEMA\fR\fR \fB\-\-c14n\fR] {\fIXML\-FILE(S)\fR... \-} |
Daniel Veillard | 6464d6a | 2006-02-19 21:35:39 +0000 | [diff] [blame] | 15 | .HP 8 |
Daniel Veillard | 51698c7 | 2006-04-06 14:02:42 +0000 | [diff] [blame] | 16 | \fBxmllint\fR \fB\-\-help\fR |
Daniel Veillard | 6464d6a | 2006-02-19 21:35:39 +0000 | [diff] [blame] | 17 | .SH "DESCRIPTION" |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 18 | .PP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 19 | The |
| 20 | \fBxmllint\fR |
| 21 | program parses one or more XML files, specified on the command line as |
| 22 | \fIXML\-FILE\fR |
| 23 | (or the standard input if the filename provided is |
| 24 | \fB\-\fR |
| 25 | ). It prints various types of output, depending upon the options selected. It is useful for detecting errors both in |
| 26 | XML |
| 27 | code and in the |
| 28 | XML |
| 29 | parser itself. |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 30 | .PP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 31 | \fBxmllint\fR |
| 32 | is included in |
| 33 | \fBlibxml\fR(3). |
Daniel Veillard | 961bfc1 | 2006-02-21 19:24:04 +0000 | [diff] [blame] | 34 | .PP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 35 | More information can be found at |
| 36 | .TP 3 |
| 37 | \(bu |
| 38 | \fBlibxml\fR(3) |
| 39 | web page |
| 40 | \fI\%http://www.xmlsoft.org/\fR |
| 41 | .TP |
| 42 | \(bu |
| 43 | W3C |
| 44 | XSLT |
| 45 | page |
| 46 | \fI\%http://www.w3.org/TR/xslt\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 47 | .SH "OPTIONS" |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 48 | .PP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 49 | \fBxmllint\fR |
| 50 | accepts the following options (in alphabetical order): |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 51 | .TP |
MST 2004 John Fleck | e42ae6f | 2004-02-27 03:26:30 +0000 | [diff] [blame] | 52 | \fB\-\-auto\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 53 | Generate a small document for testing purposes. |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 54 | .TP |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 55 | \fB\-\-catalogs\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 56 | Use the catalogs from |
| 57 | \fBSGML_CATALOG_FILES\fR. Otherwise |
| 58 | \fI/etc/xml/catalog\fR |
| 59 | is used by default. |
John Fleck | 3cbaa6d | 2004-08-15 00:47:45 +0000 | [diff] [blame] | 60 | .TP |
MST 2004 John Fleck | e42ae6f | 2004-02-27 03:26:30 +0000 | [diff] [blame] | 61 | \fB\-\-chkregister\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 62 | Turn on node registration. Useful for developers testing |
| 63 | \fBlibxml\fR(3) |
| 64 | node tracking code. |
MST 2003 John Fleck | da27174 | 2003-03-25 14:05:17 +0000 | [diff] [blame] | 65 | .TP |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 66 | \fB\-\-compress\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 67 | Turn on |
| 68 | gzip |
| 69 | compression of output. |
John Fleck | 3cbaa6d | 2004-08-15 00:47:45 +0000 | [diff] [blame] | 70 | .TP |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 71 | \fB\-\-copy\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 72 | Test the internal copy implementation. |
Daniel Veillard | e8b09e4 | 2003-05-13 22:14:13 +0000 | [diff] [blame] | 73 | .TP |
MDT 2004 John Fleck | 774a3bd | 2004-08-15 00:54:21 +0000 | [diff] [blame] | 74 | \fB\-\-c14n\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 75 | Use the W3C XML Canonicalisation (C14N) to serialize the result of parsing to |
| 76 | \fIstdout\fR. It keeps comments in the result. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 77 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 78 | \fB\-\-dtdvalid \fR\fB\fIURL\fR\fR |
| 79 | Use the |
| 80 | DTD |
| 81 | specified by an |
| 82 | \fIURL\fR |
| 83 | for validation. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 84 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 85 | \fB\-\-dtdvalidfpi \fR\fB\fIFPI\fR\fR |
| 86 | Use the |
| 87 | DTD |
| 88 | specified by a Public Identifier |
| 89 | \fIFPI\fR |
| 90 | for validation, note that this will require a Catalog exporting that Public Identifier to work. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 91 | .TP |
| 92 | \fB\-\-debug\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 93 | Parse a file and output an annotated tree of the in\-memory version of the document. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 94 | .TP |
| 95 | \fB\-\-debugent\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 96 | Debug the entities defined in the document. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 97 | .TP |
| 98 | \fB\-\-dropdtd\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 99 | Remove |
| 100 | DTD |
| 101 | from output. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 102 | .TP |
| 103 | \fB\-\-dtdattr\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 104 | Fetch external |
| 105 | DTD |
| 106 | and populate the tree with inherited attributes. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 107 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 108 | \fB\-\-encode \fR\fB\fIENCODING\fR\fR |
| 109 | Output in the given encoding. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 110 | .TP |
| 111 | \fB\-\-format\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 112 | Reformat and reindent the output. The |
| 113 | \fBXMLLINT_INDENT\fR |
| 114 | environment variable controls the indentation (default value is two spaces " "). |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 115 | .TP |
| 116 | \fB\-\-help\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 117 | Print out a short usage summary for |
| 118 | \fBxmllint\fR. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 119 | .TP |
| 120 | \fB\-\-html\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 121 | Use the |
| 122 | HTML |
| 123 | parser. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 124 | .TP |
| 125 | \fB\-\-htmlout\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 126 | Output results as an |
| 127 | HTML |
| 128 | file. This causes |
| 129 | \fBxmllint\fR |
| 130 | to output the necessary |
| 131 | HTML |
| 132 | tags surrounding the result tree output so the results can be displayed/viewed in a browser. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 133 | .TP |
| 134 | \fB\-\-insert\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 135 | Test for valid insertions. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 136 | .TP |
| 137 | \fB\-\-loaddtd\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 138 | Fetch external |
| 139 | DTD. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 140 | .TP |
| 141 | \fB\-\-load\-trace\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 142 | Display all the documents loaded during the processing to |
| 143 | \fIstderr\fR. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 144 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 145 | \fB\-\-maxmem \fR\fB\fINNBYTES\fR\fR |
| 146 | Test the parser memory support. |
| 147 | \fINNBYTES\fR |
| 148 | is the maximum number of bytes the library is allowed to allocate. This can also be used to make sure batch processing of |
| 149 | XML |
| 150 | files will not exhaust the virtual memory of the server running them. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 151 | .TP |
| 152 | \fB\-\-memory\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 153 | Parse from memory. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 154 | .TP |
| 155 | \fB\-\-noblanks\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 156 | Drop ignorable blank spaces. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 157 | .TP |
| 158 | \fB\-\-nocatalogs\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 159 | Do not use any catalogs. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 160 | .TP |
| 161 | \fB\-\-nocdata\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 162 | Substitute CDATA section by equivalent text nodes. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 163 | .TP |
| 164 | \fB\-\-noent\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 165 | Substitute entity values for entity references. By default, |
| 166 | \fBxmllint\fR |
| 167 | leaves entity references in place. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 168 | .TP |
| 169 | \fB\-\-nonet\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 170 | Do not use the Internet to fetch |
| 171 | DTDs or entities. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 172 | .TP |
| 173 | \fB\-\-noout\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 174 | Suppress output. By default, |
| 175 | \fBxmllint\fR |
| 176 | outputs the result tree. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 177 | .TP |
| 178 | \fB\-\-nowarning\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 179 | Do not emit warnings from the parser and/or validator. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 180 | .TP |
| 181 | \fB\-\-nowrap\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 182 | Do not output |
| 183 | HTML |
| 184 | doc wrapper. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 185 | .TP |
| 186 | \fB\-\-noxincludenode\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 187 | Do XInclude processing but do not generate XInclude start and end nodes. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 188 | .TP |
| 189 | \fB\-\-nsclean\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 190 | Remove redundant namespace declarations. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 191 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 192 | \fB\-\-output \fR\fB\fIFILE\fR\fR |
| 193 | Define a file path where |
| 194 | \fBxmllint\fR |
| 195 | will save the result of parsing. Usually the programs build a tree and save it on |
| 196 | \fIstdout\fR, with this option the result |
| 197 | XML |
| 198 | instance will be saved onto a file. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 199 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 200 | \fB\-\-path "\fR\fB\fIPATH(S)\fR\fR\fB"\fR |
| 201 | Use the (space\- or colon\-separated) list of filesystem paths specified by |
| 202 | \fIPATHS\fR |
| 203 | to load |
| 204 | DTDs or entities. Enclose space\-separated lists by quotation marks. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 205 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 206 | \fB\-\-pattern \fR\fB\fIPATTERNVALUE\fR\fR |
| 207 | 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. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 208 | .TP |
| 209 | \fB\-\-postvalid\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 210 | Validate after parsing is completed. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 211 | .TP |
| 212 | \fB\-\-push\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 213 | Use the push mode of the parser. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 214 | .TP |
| 215 | \fB\-\-recover\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 216 | Output any parsable portions of an invalid document. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 217 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 218 | \fB\-\-relaxng \fR\fB\fISCHEMA\fR\fR |
| 219 | Use RelaxNG file named |
| 220 | \fISCHEMA\fR |
| 221 | for validation. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 222 | .TP |
| 223 | \fB\-\-repeat\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 224 | Repeat 100 times, for timing or profiling. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 225 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 226 | \fB\-\-schema \fR\fB\fISCHEMA\fR\fR |
| 227 | Use a W3C XML Schema file named |
| 228 | \fISCHEMA\fR |
| 229 | for validation. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 230 | .TP |
| 231 | \fB\-\-shell\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 232 | Run a navigating shell. Details on available commands in shell mode are below (see |
| 233 | the section called \(lqSHELL COMMANDS\(rq). |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 234 | .TP |
| 235 | \fB\-\-stream\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 236 | Use streaming API \- useful when used in combination with |
| 237 | \fB\-\-relaxng\fR |
| 238 | or |
| 239 | \fB\-\-valid\fR |
| 240 | options for validation of files that are too large to be held in memory. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 241 | .TP |
| 242 | \fB\-\-testIO\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 243 | Test user input/output support. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 244 | .TP |
| 245 | \fB\-\-timing\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 246 | Output information about the time it takes |
| 247 | \fBxmllint\fR |
| 248 | to perform the various steps. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 249 | .TP |
| 250 | \fB\-\-valid\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 251 | Determine if the document is a valid instance of the included Document Type Definition (DTD). A |
| 252 | DTD |
| 253 | to be validated against also can be specified at the command line using the |
| 254 | \fB\-\-dtdvalid\fR |
| 255 | option. By default, |
| 256 | \fBxmllint\fR |
| 257 | also checks to determine if the document is well\-formed. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 258 | .TP |
| 259 | \fB\-\-version\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 260 | Display the version of |
| 261 | \fBlibxml\fR(3) |
| 262 | used. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 263 | .TP |
| 264 | \fB\-\-walker\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 265 | Test the walker module, which is a reader interface but for a document tree, instead of using the reader |
| 266 | API |
| 267 | on an unparsed document it works on a existing in\-memory tree. Used in debugging. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 268 | .TP |
| 269 | \fB\-\-xinclude\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 270 | Do XInclude processing. |
Daniel Veillard | 46f9721 | 2006-02-20 08:58:51 +0000 | [diff] [blame] | 271 | .TP |
| 272 | \fB\-\-xmlout\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 273 | Used in conjunction with |
| 274 | \fB\-\-html\fR. Usually when |
| 275 | HTML |
| 276 | is parsed the document is saved with the |
| 277 | HTML |
| 278 | serializer, but with this option the resulting document is saved with the |
| 279 | XML |
| 280 | serializer. This is primarily used to generate |
| 281 | XHTML |
| 282 | from |
| 283 | HTML |
| 284 | input. |
Daniel Veillard | 6464d6a | 2006-02-19 21:35:39 +0000 | [diff] [blame] | 285 | .SH "SHELL COMMANDS" |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 286 | .PP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 287 | \fBxmllint\fR |
| 288 | offers an interactive shell mode invoked with the |
| 289 | \fB\-\-shell\fR |
| 290 | command. Available commands in shell mode include (in alphabetical order): |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 291 | .TP |
| 292 | \fBbase\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 293 | Display |
| 294 | XML |
| 295 | base of the node. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 296 | .TP |
| 297 | \fBbye\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 298 | Leave the shell. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 299 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 300 | \fBcat \fR\fB\fINODE\fR\fR |
| 301 | Display the given node or the current one. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 302 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 303 | \fBcd \fR\fB\fIPATH\fR\fR |
| 304 | Change the current node to the given path (if unique) or root if no argument is given. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 305 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 306 | \fBdir \fR\fB\fIPATH\fR\fR |
| 307 | Dumps information about the node (namespace, attributes, content). |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 308 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 309 | \fBdu \fR\fB\fIPATH\fR\fR |
| 310 | Show the structure of the subtree under the given path or the current node. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 311 | .TP |
| 312 | \fBexit\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 313 | Leave the shell. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 314 | .TP |
| 315 | \fBhelp\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 316 | Show this help. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 317 | .TP |
| 318 | \fBfree\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 319 | Display memory usage. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 320 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 321 | \fBload \fR\fB\fIFILENAME\fR\fR |
| 322 | Load a new document with the given filename. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 323 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 324 | \fBls \fR\fB\fIPATH\fR\fR |
| 325 | List contents of the given path or the current directory. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 326 | .TP |
| 327 | \fBpwd\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 328 | Display the path to the current node. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 329 | .TP |
| 330 | \fBquit\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 331 | Leave the shell. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 332 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 333 | \fBsave \fR\fB\fIFILENAME\fR\fR |
| 334 | Save the current document to the given filename or to the original name. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 335 | .TP |
| 336 | \fBvalidate\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 337 | Check the document for errors. |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 338 | .TP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 339 | \fBwrite \fR\fB\fIFILENAME\fR\fR |
| 340 | Write the current node to the given filename. |
Daniel Veillard | 6464d6a | 2006-02-19 21:35:39 +0000 | [diff] [blame] | 341 | .SH "ENVIRONMENT" |
MDT 2004 John Fleck | 4c76c4f | 2004-06-20 00:36:06 +0000 | [diff] [blame] | 342 | .TP |
Daniel Veillard | 6464d6a | 2006-02-19 21:35:39 +0000 | [diff] [blame] | 343 | \fBSGML_CATALOG_FILES\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 344 | to be written ... |
Daniel Veillard | 6464d6a | 2006-02-19 21:35:39 +0000 | [diff] [blame] | 345 | .TP |
| 346 | \fBXML_CATALOG_FILES\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 347 | Catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the |
| 348 | \fBXML_CATALOG_FILES\fR |
| 349 | environment variable to a list of catalogs. An empty one should deactivate loading the default |
| 350 | \fI/etc/xml/catalog\fR |
| 351 | default catalog. |
Daniel Veillard | 6464d6a | 2006-02-19 21:35:39 +0000 | [diff] [blame] | 352 | .TP |
| 353 | \fBXML_DEBUG_CATALOG\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 354 | Setting the environment variable |
| 355 | \fBXML_DEBUG_CATALOG\fR |
| 356 | using the |
| 357 | \fBexport\fR |
| 358 | command outputs debugging information related to catalog operations. |
Daniel Veillard | 6464d6a | 2006-02-19 21:35:39 +0000 | [diff] [blame] | 359 | .TP |
| 360 | \fBXMLLINT_INDENT\fR |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 361 | to be written ... |
Daniel Veillard | 6464d6a | 2006-02-19 21:35:39 +0000 | [diff] [blame] | 362 | .SH "DIAGNOSTICS" |
Daniel Veillard | 6464d6a | 2006-02-19 21:35:39 +0000 | [diff] [blame] | 363 | .PP |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 364 | On the completion of execution, |
| 365 | \fBxmllint\fR |
| 366 | returns the following error codes: |
Daniel Veillard | 1589e8d | 2006-04-06 12:57:09 +0000 | [diff] [blame] | 367 | .TP |
| 368 | \fB0\fR |
| 369 | No error |
| 370 | .TP |
| 371 | \fB1\fR |
| 372 | Unclassified |
| 373 | .TP |
| 374 | \fB2\fR |
| 375 | Error in |
| 376 | DTD |
| 377 | .TP |
| 378 | \fB3\fR |
| 379 | Validation error |
| 380 | .TP |
| 381 | \fB4\fR |
| 382 | Validation error |
| 383 | .TP |
| 384 | \fB5\fR |
| 385 | Error in schema compilation |
| 386 | .TP |
| 387 | \fB6\fR |
| 388 | Error writing output |
| 389 | .TP |
| 390 | \fB7\fR |
| 391 | Error in pattern (generated when |
| 392 | \fB\-\-pattern\fR |
| 393 | option is used) |
| 394 | .TP |
| 395 | \fB8\fR |
| 396 | Error in Reader registration (generated when |
| 397 | \fB\-\-chkregister\fR |
| 398 | option is used) |
| 399 | .TP |
| 400 | \fB9\fR |
| 401 | Out of memory error |
| 402 | .SH "SEE ALSO" |
Daniel Veillard | bf95fd2 | 2006-04-06 08:22:51 +0000 | [diff] [blame] | 403 | .PP |
| 404 | \fBlibxml\fR(3) |
| 405 | .SH "AUTHOR" |
| 406 | John Fleck <jfleck@inkstain.net>, Ziying Sherwin <sherwin@nlm.nih.gov>, Heiko Rupp <hwr@pilhuhn.de>. |