applied man page improvement from Daniel Leidert Daniel
[platform/upstream/libxslt.git] / doc / xsltproc.1
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 "XSLTPROC" "1" "2006\-03\-05" "libxslt" ""
6 .\" disable hyphenation
7 .nh
8 .\" disable justification (adjust text to left margin only)
9 .ad l
10 .SH "NAME"
11 xsltproc \- command line XSLT processor
12 .SH "SYNOPSIS"
13 .HP 9
14 \fBxsltproc\fR [[\fB\-V\fR \fB\-\-version\fR] [\fB\-v\fR \fB\-\-verbose\fR] [{\fB\-o\fR \fB\-\-output\fR} {\fIFILE\fR \fIDIRECTORY\fR}] \fB\-\-timing\fR \fB\-\-repeat\fR \fB\-\-debug\fR \fB\-\-novalid\fR \fB\-\-noout\fR \fB\-\-maxdepth\ \fR\fB\fIVALUE\fR\fR \fB\-\-html\fR \fB\-\-param\ \fR\fB\fIPARAMNAME\fR\fR\fB\ \fR\fB\fIPARAMVALUE\fR\fR\fB\ \fR \fB\-\-stringparam\ \fR\fB\fIPARAMNAME\fR\fR\fB\ \fR\fB\fIPARAMVALUE\fR\fR\fB\ \fR \fB\-\-nonet\fR \fB\-\-path\ "\fR\fB\fIPATH(S)\fR\fR\fB"\fR \fB\-\-load\-trace\fR \fB\-\-catalogs\fR \fB\-\-xinclude\fR [\fB\-\-profile\fR\ \fB\-\-norman\fR] \fB\-\-dumpextensions\fR \fB\-\-nowrite\fR \fB\-\-nomkdir\fR \fB\-\-writesubtree\ \fR\fB\fIPATH\fR\fR \fB\-\-nodtdattr\fR] [\fISTYLESHEET\fR] {\fIXML\-FILE\fR \-}
15 .SH "DESCRIPTION"
16 .PP
17 \fBxsltproc\fR
18 is a command line tool for applying
19 XSLT
20 stylesheets to
21 XML
22 documents. It is part of
23 \fBlibxslt\fR(3), the XSLT C library for GNOME. While it was developed as part of the GNOME project, it can operate independently of the GNOME desktop.
24 .PP
25 \fBxsltproc\fR
26 is invoked from the command line with the name of the stylesheet to be used followed by the name of the file or files to which the stylesheet is to be applied. It will use the standard input if a filename provided is
27 \fB\-\fR
28 .
29 .PP
30 If a stylesheet is included in an
31 XML
32 document with a Stylesheet Processing Instruction, no stylesheet need to be named at the command line.
33 \fBxsltproc\fR
34 will automatically detect the included stylesheet and use it.
35 .PP
36 By default, output is to
37 \fIstdout\fR. You can specify a file for output using the
38 \fB\-o\fR
39 or
40 \fB\-\-output\fR
41 option.
42 .PP
43 More information can be found at
44 .TP 3
45 \(bu
46 \fBlibxml\fR(3)
47 web page
48 \fI\%http://www.xmlsoft.org/\fR
49 .TP
50 \(bu
51 W3C
52 XSLT
53 page
54 \fI\%http://www.w3.org/TR/xslt\fR
55 .SH "OPTIONS"
56 .PP
57 \fBxsltproc\fR
58 accepts the following options (in alphabetical order):
59 .TP
60 \fB\-\-catalogs\fR
61 Use the
62 SGML
63 catalog specified in
64 \fBSGML_CATALOG_FILES\fR
65 to resolve the location of external entities. By default,
66 \fBxsltproc\fR
67 looks for the catalog specified in
68 \fBXML_CATALOG_FILES\fR. If that is not specified, it uses
69 \fI/etc/xml/catalog\fR.
70 .TP
71 \fB\-\-debug\fR
72 Output an
73 XML
74 tree of the transformed document for debugging purposes.
75 .TP
76 \fB\-\-dumpextensions\fR
77 Dumps the list of all registered extensions on
78 \fIstdout\fR.
79 .TP
80 \fB\-\-html\fR
81 The input document is an
82 HTML
83 file.
84 .TP
85 \fB\-\-load\-trace\fR
86 Display all the documents loaded during the processing to
87 \fIstderr\fR.
88 .TP
89 \fB\-\-maxdepth \fR\fB\fIVALUE\fR\fR
90 Adjust the maximum depth of the template stack before
91 \fBlibxslt\fR(3)
92 concludes it is in an infinite loop. The default is 500.
93 .TP
94 \fB\-\-nodtdattr\fR
95 Do not apply default attributes from the document's
96 DTD.
97 .TP
98 \fB\-\-nomkdir\fR
99 Refuses to create directories.
100 .TP
101 \fB\-\-nonet\fR
102 Do not use the Internet to fetch
103 DTDs, entities or documents.
104 .TP
105 \fB\-\-noout\fR
106 Do not output the result.
107 .TP
108 \fB\-\-novalid\fR
109 Skip loading the document's
110 DTD.
111 .TP
112 \fB\-\-nowrite\fR
113 Refuses to write to any file or resource.
114 .TP
115 \fB\-o\fR or \fB\-\-output\fR \fIFILE\fR | \fIDIRECTORY\fR
116 Direct output to the given
117 \fIFILE\fR. Using the option with a
118 \fIDIRECTORY\fR
119 directs the output files to the specified directory. This can be useful for multiple outputs (also known as "chunking") or manpage processing.
120 \fBNote:\fR
121 The given directory
122 \fBmust\fR
123 already exist.
124 .TP
125 \fB\-\-param \fR\fB\fIPARAMNAME\fR\fR\fB \fR\fB\fIPARAMVALUE\fR\fR
126 Pass a parameter of name
127 \fIPARAMNAME\fR
128 and value
129 \fIPARAMVALUE\fR
130 to the stylesheet. You may pass multiple name/value pairs up to a maximum of 32. If the value being passed is a string rather than a node identifier, use
131 \fB\-\-stringparam\fR
132 instead.
133 .TP
134 \fB\-\-path "\fR\fB\fIPATH(S)\fR\fR\fB"\fR
135 Use the (space\- or colon\-separated) list of filesystem paths specified by
136 \fIPATHS\fR
137 to load
138 DTDs, entities or documents. Enclose space\-separated lists by quotation marks.
139 .TP
140 \fB\-\-profile\fR or \fB\-\-norman\fR
141 Output profiling information detailing the amount of time spent in each part of the stylesheet. This is useful in optimizing stylesheet performance.
142 .TP
143 \fB\-\-repeat\fR
144 Run the transformation 20 times. Used for timing tests.
145 .TP
146 \fB\-\-stringparam \fR\fB\fIPARAMNAME\fR\fR\fB \fR\fB\fIPARAMVALUE\fR\fR
147 Pass a paramenter of name
148 \fIPARAMNAME\fR
149 and value
150 \fIPARAMVALUE\fR
151 where
152 \fIPARAMVALUE\fR
153 is a string rather than a node identifier.
154 \fBNote:\fR
155 The string must be UTF\-8 encoded.
156 .TP
157 \fB\-\-timing\fR
158 Display the time used for parsing the stylesheet, parsing the document and applying the stylesheet and saving the result. Displayed in milliseconds.
159 .TP
160 \fB\-v\fR or \fB\-\-verbose\fR
161 Output each step taken by
162 \fBxsltproc\fR
163 in processing the stylesheet and the document.
164 .TP
165 \fB\-V\fR or \fB\-\-version\fR
166 Show the version of
167 \fBlibxml\fR(3)
168 and
169 \fBlibxslt\fR(3)
170 used.
171 .TP
172 \fB\-\-writesubtree \fR\fB\fIPATH\fR\fR
173 Allow file write only within the
174 \fIPATH\fR
175 subtree.
176 .TP
177 \fB\-\-xinclude\fR
178 Process the input document using the Xinclude specification. More details on this can be found in the Xinclude specification:
179 \fI\%http://www.w3.org/TR/xinclude/\fR
180 .SH "ENVIRONMENT"
181 .TP
182 \fBSGML_CATALOG_FILES\fR
183 to be written ...
184 .TP
185 \fBXML_CATALOG_FILES\fR
186 Catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the
187 \fBXML_CATALOG_FILES\fR
188 environment variable to a list of catalogs. An empty one should deactivate loading the default
189 \fI/etc/xml/catalog\fR
190 default catalog.
191 .SH "DIAGNOSTICS"
192 .PP
193 \fBxsltproc\fR's return codes provide information that can be used when calling it from scripts.
194 Errorcode: \fB0\fRError: No errorErrorcode: \fB1\fRError: No argumentErrorcode: \fB2\fRError: Too many parametersErrorcode: \fB3\fRError: Unknown optionErrorcode: \fB4\fRError: Failed to parse the stylesheetErrorcode: \fB5\fRError: Error in the stylesheetErrorcode: \fB6\fRError: Error in one of the documentsErrorcode: \fB7\fRError: Unsupported xsl:output methodErrorcode: \fB8\fRError: String parameter contains both quote and double\-quotesErrorcode: \fB9\fRError: Internal processing errorErrorcode: \fB10\fRError: Processing was stopped by a terminating message.SH "SEE ALSO"
195 .PP
196 \fBlibxslt\fR(3)
197 .SH "AUTHOR"
198 John Fleck <jfleck@inkstain.net>.