Updated the on-line documentation, Daniel
[platform/upstream/libxslt.git] / doc / xsltproc.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2 <html>
3 <head>
4 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
5 <title>xsltproc</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.41">
7 </head>
8 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
9 <h1 class="title">
10 <a name="id2589653"></a>xsltproc</h1>
11 <div class="refnamediv">
12 <a name="id2708033"></a><h2>Name</h2>xsltproc &#x2014; command line xslt processor</div>
13 <div class="refsynopsisdiv">
14 <a name="id2708046"></a><h2>Synopsis</h2>
15 <div class="cmdsynopsis" id="id2708049">
16 <a name="id2708049"></a><tt>xsltproc</tt>  [-V | -v | -o <i><tt>file</tt></i> | --timing | --repeat | --debug | --novalid | --noout | --maxdepth <i><tt>val</tt></i> | --html | --docbook | --param <i><tt>name</tt></i> <i><tt>value</tt></i> | --nonet | --warnnet | --catalogs | --xinclude | --profile] [<tt><i><tt>stylesheet</tt></i></tt>] [<i><tt>file1</tt></i>] [<i><tt>file2</tt></i>] [<i><tt>....</tt></i>]</div>
17 </div>
18 <div class="refsect1">
19 <a name="introduction"></a><h2>
20 <a name="introduction"></a>Introduction</h2>
21 <p>
22       xsltproc is a command line tool for applying
23       XSLT stylesheets to XML
24       documents. It is part of libxslt, the XSLT C
25       library for GNOME. While it was developed as part of the GNOME project, it
26       can operate independently of the GNOME desktop.
27    </p>
28 <p>
29       xsltproc is invoked from the command line with
30       the name of the stylesheet to be used followed by the name of the file or
31       files to which the stylesheet is to be applied.
32     </p>
33 <p>
34       If a stylesheet is included in an XML document with a
35       Stylesheet Processing Instruction, no stylesheet need be named at the
36       command line. xsltproc will automatically
37       detect the included stylesheet and use it.
38     </p>
39 <p>
40       By default, output is to stdout. You can specify a file for output using
41       the <tt>-o</tt> option.
42     </p>
43 </div>
44 <div class="refsect1">
45 <a name="options"></a><h2>
46 <a name="options"></a>Options</h2>
47 <p>
48       <tt>-V</tt> or <tt>--version</tt> - Show the version of
49       libxml and libxslt used.
50     </p>
51 <p>
52       <tt>-v</tt> or <tt>--verbose</tt> - Output each step taken
53       by xsltproc in processing the stylesheet and the document.
54     </p>
55 <p>
56       <tt>-o</tt> or <tt>--output</tt>
57       <i><tt>file</tt></i> - Direct output to the file named
58       <i><tt>file</tt></i>. For multiple outputs, also known as
59       &quot;chunking&quot;, <tt>-o</tt> <tt>directory/</tt> directs the
60       output files to a specified directory. The directory must already exist.
61     </p>
62 <p>
63       <tt>--timing</tt> - Display the time used for parsing the
64       stylesheet, parsing the document and applying the stylesheet and saving
65       the result. Displayed in milliseconds.
66     </p>
67 <p>
68       <tt>--repeat</tt> - Run the transformation 20 times. Used for
69       timing tests.
70     </p>
71 <p>
72       <tt>--debug</tt> - Output an XML tree of the
73       transformed document for debugging purposes.
74     </p>
75 <p>
76       <tt>--novalid</tt> - Skip loading the document's DTD.
77     </p>
78 <p>
79       <tt>--noout</tt> - Do not output the result.
80     </p>
81 <p>
82       <tt>--maxdepth</tt> <i><tt>value</tt></i> - Adjust the
83       maximum depth of the template stack before
84       libxslt concludes it is in an infinite
85       loop. The default is 500.
86     </p>
87 <p>
88       <tt>--html</tt> - The input document is an HTML
89       file.
90     </p>
91 <p>
92       <tt>--docbook</tt> - The input document is DocBook
93       SGML.
94     </p>
95 <p>
96       <tt>--param</tt> <i><tt>name</tt></i>
97       <i><tt>value</tt></i> - Pass a parameter of name
98       <i><tt>name</tt></i> and value
99       <i><tt>value</tt></i> to the stylesheet. You may pass multiple
100       name/value pairs up to a maximum of 8.
101
102       <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
103 <h3 class="title">
104 <a name="id2708378"></a>Note</h3>
105 <p>
106           If the value being passed is a string rather than a node identifier,
107           it must be escaped in quotes, as follows:
108         </p>
109 <p>
110           xsltproc --param rootid '&quot;introduction&quot;'
111           <i><tt>stylesheet</tt></i> <i><tt>file</tt></i>
112
113         </p>
114 </div>
115     </p>
116 <p>
117       <tt>--nonet</tt> - Do not use the Internet to fetch DTD's or
118       entities.
119     </p>
120 <p>
121       <tt>--warnnet</tt> - Output notification when DTD's or entities
122       are fetched over the Internet.
123     </p>
124 <p>
125       <tt>--catalogs</tt> - Use catalogs to resolve the location of
126       external entities. This speeds DTD resolution. By having a
127       catalog file point to a local version of the DTD,
128       xsltproc does not have to use the
129       Internet to fetch the DTD. xsltproc
130       uses the catalog identified by the environmental variable
131       <tt>SGML_CATALOG_FILES</tt>.
132     </p>
133 <p>
134       <tt>--xinclude</tt> - Process the input document using the
135       Xinclude specification. More details on this can be found in the Xinclude
136       specification: <a href="http://www.w3.org/TR/xinclude/" target="_top">http://www.w3.org/TR/xinclude/</a>
137     </p>
138 <p>
139       <tt>--profile</tt> or <tt>--norman</tt> - Output profiling
140       information detailing the amount of time spent in each part of the
141       stylesheet. This is useful in optimizing stylesheet performance.
142     </p>
143 </div>
144 <div class="refsect1">
145 <a name="moreinfo"></a><h2>
146 <a name="moreinfo"></a>More Information</h2>
147 <p>
148       <div class="itemizedlist"><ul>
149 <li><p>
150 <a name="id2708506"></a>libxml web page: <a href="http://www.xmlsoft.org/" target="_top">http://www.xmlsoft.org/</a>
151 </p></li>
152 <li><p>
153 <a name="id2708525"></a>W3C XSLT page: <a href="http://www.w3.org/TR/xslt" target="_top">http://www.w3.org/TR/xslt</a>
154 </p></li>
155 </ul></div>
156     </p>
157 </div>
158 </div></body>
159 </html>