1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xsltproc</title><meta name="generator" content="DocBook XSL Stylesheets V1.57.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2589410"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xsltproc — command line xslt processor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt>xsltproc</tt> [[-V] | [-v] | [-o <i><tt>file</tt></i>] | [--timing] | [--repeat] | [--debug] | [--novalid] | [--noout] | [--maxdepth <i><tt>val</tt></i>] | [--html] | [--param <i><tt>name</tt></i> <i><tt>value</tt></i>] | [--stringparam <i><tt>name</tt></i> <i><tt>value</tt></i>] | [--nonet] | [--catalogs] | [--xinclude] | [--profile] | [--dumpextensions] | [--nowrite] | [--nomkdir] | [--writesubtree]] [<tt><i><tt>stylesheet</tt></i></tt>] [<i><tt>file1</tt></i>] [<i><tt>file2</tt></i>] [<i><tt>....</tt></i>]</p></div></div><div class="refsect1" lang="en"><a name="introduction"></a><h2>Introduction</h2><p> |
---|
2 | xsltproc is a command line tool for applying |
---|
3 | XSLT stylesheets to XML |
---|
4 | documents. It is part of libxslt, the XSLT C |
---|
5 | library for GNOME. While it was developed as part of the GNOME project, it |
---|
6 | can operate independently of the GNOME desktop. |
---|
7 | </p><p> |
---|
8 | xsltproc is invoked from the command line with |
---|
9 | the name of the stylesheet to be used followed by the name of the file or |
---|
10 | files to which the stylesheet is to be applied. |
---|
11 | </p><p> |
---|
12 | If a stylesheet is included in an XML document with a |
---|
13 | Stylesheet Processing Instruction, no stylesheet need be named at the |
---|
14 | command line. xsltproc will automatically |
---|
15 | detect the included stylesheet and use it. |
---|
16 | </p><p> |
---|
17 | By default, output is to stdout. You can specify a file for output using |
---|
18 | the <tt>-o</tt> option. |
---|
19 | </p></div><div class="refsect1" lang="en"><a name="options"></a><h2>Command Line Options</h2><div class="variablelist"><dl><dt><span class="term"><tt>-V</tt> or <tt>--version</tt></span></dt><dd>Show the version of |
---|
20 | libxml and libxslt used. |
---|
21 | </dd><dt><span class="term"> |
---|
22 | <tt>-v</tt> or <tt>--verbose</tt></span></dt><dd>Output each step taken |
---|
23 | by xsltproc in processing the stylesheet and the document. |
---|
24 | </dd><dt><span class="term"> |
---|
25 | <tt>-o</tt> or <tt>--output</tt> <i><tt>file</tt></i></span></dt><dd>Direct output to the file named |
---|
26 | <i><tt>file</tt></i>. For multiple outputs, also known as |
---|
27 | "chunking", <tt>-o</tt> <tt>directory/</tt> directs the |
---|
28 | output files to a specified directory. The directory must already exist. |
---|
29 | </dd><dt><span class="term"> |
---|
30 | <tt>--timing</tt></span></dt><dd>Display the time used for parsing the |
---|
31 | stylesheet, parsing the document and applying the stylesheet and saving |
---|
32 | the result. Displayed in milliseconds. |
---|
33 | </dd><dt><span class="term"> |
---|
34 | <tt>--repeat</tt></span></dt><dd>Run the transformation 20 times. Used for |
---|
35 | timing tests. |
---|
36 | </dd><dt><span class="term"> |
---|
37 | <tt>--debug</tt></span></dt><dd>Output an XML tree of the |
---|
38 | transformed document for debugging purposes. |
---|
39 | </dd><dt><span class="term"> |
---|
40 | <tt>--novalid</tt></span></dt><dd>Skip loading the document's DTD. |
---|
41 | </dd><dt><span class="term"> |
---|
42 | <tt>--noout</tt></span></dt><dd>Do not output the result. |
---|
43 | </dd><dt><span class="term"> |
---|
44 | <tt>--maxdepth</tt> <i><tt>value</tt></i></span></dt><dd>Adjust the |
---|
45 | maximum depth of the template stack before |
---|
46 | libxslt concludes it is in an infinite |
---|
47 | loop. The default is 500. |
---|
48 | </dd><dt><span class="term"> |
---|
49 | <tt>--html</tt></span></dt><dd>The input document is an HTML |
---|
50 | file. |
---|
51 | </dd><dt><span class="term"> |
---|
52 | <tt>--param</tt> <i><tt>name</tt></i> <i><tt>value</tt></i></span></dt><dd>Pass a parameter of name |
---|
53 | <i><tt>name</tt></i> and value |
---|
54 | <i><tt>value</tt></i> to the stylesheet. You may pass multiple |
---|
55 | name/value pairs up to a maximum of 32. If the value being passed is a |
---|
56 | string rather than a node identifier, use |
---|
57 | <tt>--stringparam</tt> instead. |
---|
58 | </dd><dt><span class="term"> |
---|
59 | <tt>--stringparam</tt> <i><tt>name</tt></i> <i><tt>value</tt></i></span></dt><dd>Pass a paramenter of name <i><tt>name</tt></i> and |
---|
60 | value <i><tt>value</tt></i> where |
---|
61 | <i><tt>value</tt></i> is a string rather than a node |
---|
62 | identifier. (Note: The string must be utf-8.) </dd><dt><span class="term"> |
---|
63 | <tt>--nonet</tt></span></dt><dd>Do not use the Internet to fetch DTD's or |
---|
64 | entities. |
---|
65 | </dd><dt><span class="term"> |
---|
66 | <tt>--catalogs</tt></span></dt><dd>Use the SGML catalog specified in |
---|
67 | <tt>SGML_CATALOG_FILES</tt> to resolve the location of |
---|
68 | external entities. By default, xsltproc |
---|
69 | looks for the catalog specified in |
---|
70 | <tt>XML_CATALOG_FILES</tt>. If that is not specified, it uses |
---|
71 | <tt>/etc/xml/catalog</tt>. |
---|
72 | </dd><dt><span class="term"> |
---|
73 | <tt>--xinclude</tt></span></dt><dd>Process the input document using the |
---|
74 | Xinclude specification. More details on this can be found in the Xinclude |
---|
75 | specification: <a href="http://www.w3.org/TR/xinclude/" target="_top">http://www.w3.org/TR/xinclude/</a> |
---|
76 | </dd><dt><span class="term"> |
---|
77 | <tt>--profile</tt> or <tt>--norman</tt></span></dt><dd>Output profiling |
---|
78 | information detailing the amount of time spent in each part of the |
---|
79 | stylesheet. This is useful in optimizing stylesheet performance. |
---|
80 | </dd><dt><span class="term"> |
---|
81 | <tt>--dumpextensions</tt></span></dt><dd>Dumps the list of all registered extensions on stdout. |
---|
82 | </dd><dt><span class="term"> |
---|
83 | <tt>--nowrite</tt></span></dt><dd>Refuses to write to any file or resource. |
---|
84 | </dd><dt><span class="term"> |
---|
85 | <tt>--nomkdir</tt></span></dt><dd>Refuses to create directories. |
---|
86 | </dd><dt><span class="term"> |
---|
87 | <tt>--writesubtree</tt> <i><tt>path</tt></i></span></dt><dd>Allow file write only within the |
---|
88 | <i><tt>path</tt></i> subtree. |
---|
89 | </dd></dl></div></div><div class="refsect1" lang="en"><a name="return"></a><h2>Return values</h2><p>xsltproc's return codes provide information |
---|
90 | that can be used when calling it from scripts.</p><p>0: normal</p><p>1: no argument</p><p>2: too many parameters</p><p>3: unknown option</p><p>4: failed to parse the stylesheet</p><p>5: error in the stylesheet</p><p>6: error in one of the documents</p><p>7: unsupported xsl:output method</p><p>8: string parameter contains both quote and double-quotes</p><p>9: internal processing error</p><p>10: processing was stopped by a terminating message</p></div><div class="refsect1" lang="en"><a name="moreinfo"></a><h2>More Information</h2><p>libxml web page: <a href="http://www.xmlsoft.org/" target="_top">http://www.xmlsoft.org/</a></p><p>W3C XSLT page: <a href="http://www.w3.org/TR/xslt" target="_top">http://www.w3.org/TR/xslt</a></p></div></div></body></html> |
---|