source: trunk/third/libxslt/doc/xsltproc.xml @ 18215

Revision 18215, 10.0 KB checked in by ghudson, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18214, which included commits to RCS files with non-trunk default branches.
Line 
1<?xml version="1.0"?>
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
4]>
5
6<refentry>
7  <refentryinfo>
8    <title>xsltproc Manual</title>
9    <copyright>
10      <year>2001, 2002</year>
11    </copyright>
12    <author>
13      <firstname>John</firstname>
14      <surname>Fleck</surname>
15    </author>
16    <address><email>jfleck@inkstain.net</email></address>
17   
18    <releaseinfo>This is release 0.4 of the xsltproc Manual.</releaseinfo>
19  </refentryinfo>
20
21  <refmeta>
22    <refentrytitle>xsltproc</refentrytitle>
23    <manvolnum>1</manvolnum>
24  </refmeta>
25
26  <refnamediv>
27    <refname>xsltproc</refname>
28    <refpurpose>command line xslt processor</refpurpose>
29  </refnamediv>
30
31  <refsynopsisdiv>
32    <cmdsynopsis>
33      <command>xsltproc</command>
34      <group>
35        <arg>-V</arg>
36        <arg>-v</arg>
37        <arg>-o <replaceable>file</replaceable></arg>
38        <arg>--timing</arg>
39        <arg>--repeat</arg>
40        <arg>--debug</arg>
41        <arg>--novalid</arg>
42        <arg>--noout</arg>
43        <arg>--maxdepth <replaceable>val</replaceable></arg>
44        <arg>--html</arg>
45        <arg>--docbook</arg>
46        <arg>--param <replaceable>name</replaceable> <replaceable>value</replaceable></arg>
47        <arg>--stringparam <replaceable>name</replaceable> <replaceable>value</replaceable></arg>
48        <arg>--nonet</arg>
49        <arg>--catalogs</arg>
50        <arg>--xinclude</arg>
51        <arg>--profile</arg>
52        <arg>--dumpextensions</arg>
53        <arg>--nowrite</arg>
54        <arg>--nomkdir</arg>
55        <arg>--writesubtree</arg>
56      </group>
57      <arg><option><replaceable>stylesheet</replaceable></option></arg>
58      <arg><replaceable>file1</replaceable></arg>
59      <arg><replaceable>file2</replaceable></arg>
60      <arg><replaceable>....</replaceable></arg>
61    </cmdsynopsis>
62  </refsynopsisdiv>
63
64
65  <refsect1 id="introduction">
66    <title>Introduction</title>
67    <para>
68      <application>xsltproc</application> is a command line tool for applying
69      <acronym>XSLT</acronym> stylesheets to <acronym>XML</acronym>
70      documents. It is part of <application>libxslt</application>, the XSLT C
71      library for GNOME. While it was developed as part of the GNOME project, it
72      can operate independently of the GNOME desktop.
73   </para>
74
75    <para>
76      <application>xsltproc</application> is invoked from the command line with
77      the name of the stylesheet to be used followed by the name of the file or
78      files to which the stylesheet is to be applied.
79    </para>
80
81    <para>
82      If a stylesheet is included in an <acronym>XML</acronym> document with a
83      Stylesheet Processing Instruction, no stylesheet need be named at the
84      command line. <application>xsltproc</application> will automatically
85      detect the included stylesheet and use it.
86    </para>
87
88    <para>
89      By default, output is to stdout. You can specify a file for output using
90      the <option>-o</option> option.
91    </para>
92  </refsect1>
93
94  <refsect1 id="options">
95    <title>Command Line Options</title>
96   
97    <variablelist>
98      <varlistentry>
99        <term><option>-V</option> or <option>--version</option></term>
100        <listitem>
101          <simpara>Show the version of
102      <application>libxml</application> and <application>libxslt</application> used.
103    </simpara>
104        </listitem>
105      </varlistentry>
106
107   
108      <varlistentry>
109        <term>
110      <option>-v</option> or <option>--verbose</option></term>
111        <listitem>
112          <simpara>Output each step taken
113      by <application>xsltproc</application> in processing the stylesheet and the document.
114    </simpara>
115        </listitem>
116      </varlistentry>
117
118   
119      <varlistentry>
120        <term>
121      <option>-o</option> or <option>--output</option> <replaceable>file</replaceable></term>
122        <listitem>
123          <simpara>Direct output to the file named
124      <replaceable>file</replaceable>. For multiple outputs, also known as
125      "chunking", <option>-o</option> <option>directory/</option> directs the
126      output files to a specified directory. The directory must already exist.
127    </simpara>
128        </listitem>
129      </varlistentry>
130
131   
132      <varlistentry>
133        <term>
134      <option>--timing</option></term>
135        <listitem>
136          <simpara>Display the time used for parsing the
137      stylesheet, parsing the document and applying the stylesheet and saving
138      the result. Displayed in milliseconds.
139    </simpara>
140        </listitem>
141      </varlistentry>
142
143   
144      <varlistentry>
145        <term>
146      <option>--repeat</option></term>
147        <listitem>
148          <simpara>Run the transformation 20 times. Used for
149      timing tests.
150    </simpara>
151        </listitem>
152      </varlistentry>
153
154   
155      <varlistentry>
156        <term>
157      <option>--debug</option></term>
158        <listitem>
159          <simpara>Output an <acronym>XML</acronym> tree of the
160      transformed document for debugging purposes.
161    </simpara>
162        </listitem>
163      </varlistentry>
164
165   
166      <varlistentry>
167        <term>
168      <option>--novalid</option></term>
169        <listitem>
170          <simpara>Skip loading the document's <acronym>DTD</acronym>.
171    </simpara>
172        </listitem>
173      </varlistentry>
174
175   
176      <varlistentry>
177        <term>
178      <option>--noout</option></term>
179        <listitem>
180          <simpara>Do not output the result.
181    </simpara>
182        </listitem>
183      </varlistentry>
184
185   
186      <varlistentry>
187        <term>
188      <option>--maxdepth</option> <replaceable>value</replaceable></term>
189        <listitem>
190          <simpara>Adjust the
191      maximum depth of the template stack before
192      <application>libxslt</application> concludes it is in an infinite
193      loop. The default is 500.
194    </simpara>
195        </listitem>
196      </varlistentry>
197
198   
199      <varlistentry>
200        <term>
201      <option>--html</option></term>
202        <listitem>
203          <simpara>The input document is an <acronym>HTML</acronym>
204      file.
205    </simpara>
206        </listitem>
207      </varlistentry>
208
209   
210      <varlistentry>
211        <term>
212      <option>--docbook</option></term>
213        <listitem>
214          <simpara>The input document is DocBook
215      <acronym>SGML</acronym>.
216    </simpara>
217        </listitem>
218      </varlistentry>
219
220   
221      <varlistentry>
222        <term>
223      <option>--param</option> <replaceable>name</replaceable> <replaceable>value</replaceable></term>
224        <listitem>
225          <simpara>Pass a parameter of name
226      <replaceable>name</replaceable> and value
227      <replaceable>value</replaceable> to the stylesheet. You may pass multiple
228      name/value pairs up to a maximum of 32. If the value being passed is a
229            string rather than a node identifier, use
230            <option>--stringparam</option> instead.
231          </simpara>
232        </listitem>
233      </varlistentry>
234
235      <varlistentry>
236        <term>
237          <option>--stringparam</option> <replaceable>name</replaceable> <replaceable>value</replaceable></term>
238        <listitem>
239          <simpara>Pass a paramenter of name <replaceable>name</replaceable> and
240            value <replaceable>value</replaceable> where
241            <replaceable>value</replaceable> is a string rather than a node
242            identifier. (Note: The string must be utf-8.) </simpara>
243        </listitem>
244      </varlistentry>
245   
246      <varlistentry>
247        <term>
248      <option>--nonet</option></term>
249        <listitem>
250          <simpara>Do not use the Internet to fetch DTD's or
251      entities.
252    </simpara>
253        </listitem>
254      </varlistentry>
255   
256      <varlistentry>
257        <term>
258      <option>--catalogs</option></term>
259        <listitem>
260          <simpara>Use the <acronym>SGML</acronym> catalog specified in
261      <envar>SGML_CATALOG_FILES</envar> to resolve the location of
262            external entities. By default, <application>xsltproc</application>
263            looks for the catalog specified in
264      <envar>XML_CATALOG_FILES</envar>. If that is not specified, it uses
265      <filename>/etc/xml/catalog</filename>.
266    </simpara>
267        </listitem>
268      </varlistentry>
269
270   
271      <varlistentry>
272        <term>
273      <option>--xinclude</option></term>
274        <listitem>
275          <simpara>Process the input document using the
276      Xinclude specification. More details on this can be found in the Xinclude
277      specification: <ulink
278      url="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</ulink>
279    </simpara>
280        </listitem>
281      </varlistentry>
282   
283   
284      <varlistentry>
285        <term>
286      <option>--profile</option> or <option>--norman</option></term>
287        <listitem>
288          <simpara>Output profiling
289      information detailing the amount of time spent in each part of the
290      stylesheet. This is useful in optimizing stylesheet performance.
291    </simpara>
292        </listitem>
293      </varlistentry>
294
295      <varlistentry>
296        <term>
297      <option>--dumpextensions</option></term>
298        <listitem>
299          <simpara>Dumps the list of all registered extensions on stdout.
300    </simpara>
301        </listitem>
302      </varlistentry>
303
304      <varlistentry>
305        <term>
306      <option>--nowrite</option></term>
307        <listitem>
308          <simpara>Refuses to write to any file or resource.
309    </simpara>
310        </listitem>
311      </varlistentry>
312   
313      <varlistentry>
314        <term>
315      <option>--nomkdir</option></term>
316        <listitem>
317          <simpara>Refuses to create directories.
318    </simpara>
319        </listitem>
320      </varlistentry>
321   
322      <varlistentry>
323        <term>
324      <option>--writesubtree</option> <replaceable>path</replaceable></term>
325        <listitem>
326          <simpara>Allow file write only within the
327          <replaceable>path</replaceable> subtree.
328    </simpara>
329        </listitem>
330      </varlistentry>
331   
332   
333    </variablelist>
334  </refsect1>
335
336  <refsect1 id="return">
337    <title>Return values</title>
338    <para><application>xsltproc</application>'s return codes provide information
339    that can be used when calling it from scripts.</para>
340
341    <para>0: normal</para>
342    <para>1: no argument</para>
343    <para>2: too many parameters</para>
344    <para>3: unknown option</para>
345    <para>4: failed to parse the stylesheet</para>
346    <para>5: error in the stylesheet</para>
347    <para>6: error in one of the documents</para>
348    <para>7: unsupported xsl:output method</para>
349    <para>8: string parameter contains both quote and double-quotes</para>
350    <para>9: internal processing error</para>
351    <para>10: processing was stopped by a terminating message</para>
352  </refsect1>
353
354
355
356  <refsect1 id="moreinfo">
357    <title>More Information</title>
358   
359          <para><application>libxml web page: </application><ulink url="http://www.xmlsoft.org/">http://www.xmlsoft.org/</ulink></para>
360       
361          <para>W3C <acronym>XSLT page: </acronym><ulink url="http://www.w3.org/TR/xslt">http://www.w3.org/TR/xslt</ulink></para>
362       
363 
364  </refsect1>
365</refentry>
Note: See TracBrowser for help on using the repository browser.