Updated the on-line documentation, Daniel
[platform/upstream/libxslt.git] / doc / xsltproc.xml
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</year>
11     </copyright>
12     <author>
13       <firstname>John</firstname>
14       <surname>Fleck</surname>
15     </author>
16     <address><email>jfleck@inkstain.net</email></address>
17     <legalnotice id="legalnotice">
18       <para>Permission is granted to copy, distribute and/or modify this document
19         under the terms of the <ulink type="help" url="gnome-help:fdl"><citetitle>GNU Free Documentation
20             License</citetitle></ulink>, Version 1.1 or any later version 
21         published by the Free Software Foundation with no Invariant Sections, 
22         no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
23         can be found <ulink type="help" url="gnome-help:fdl">here</ulink>.
24       </para>
25       <para>Many of the names used by companies to distinguish their products and
26         services are claimed as trademarks. Where those names appear in any
27         GNOME documentation, and those trademarks are made aware to the members
28         of the GNOME Documentation Project, the names have been printed in caps
29         or initial caps.
30       </para>
31     </legalnotice>
32     <releaseinfo>This is release 0.1 of the xsltproc Manual.</releaseinfo>
33   </refentryinfo>
34
35   <refmeta>
36     <refentrytitle>xsltproc</refentrytitle>
37     <manvolnum>1</manvolnum>
38   </refmeta>
39
40   <refnamediv>
41     <refname>xsltproc</refname>
42     <refpurpose>command line xslt processor</refpurpose>
43   </refnamediv>
44
45   <refsynopsisdiv>
46     <cmdsynopsis>
47       <command>xsltproc</command>
48       <group>
49         <arg>-V</arg>
50         <arg>-v</arg>
51         <arg>-o <replaceable>file</replaceable></arg>
52         <arg>--timing</arg>
53         <arg>--repeat</arg>
54         <arg>--debug</arg>
55         <arg>--novalid</arg>
56         <arg>--noout</arg>
57         <arg>--maxdepth <replaceable>val</replaceable></arg>
58         <arg>--html</arg>
59         <arg>--docbook</arg>
60         <arg>--param <replaceable>name</replaceable> <replaceable>value</replaceable></arg>
61         <arg>--nonet</arg>
62         <arg>--warnnet</arg>
63         <arg>--catalogs</arg>
64         <arg>--xinclude</arg>
65         <arg>--profile</arg>
66       </group>
67       <arg><option><replaceable>stylesheet</replaceable></option></arg>
68       <arg><replaceable>file1</replaceable></arg>
69       <arg><replaceable>file2</replaceable></arg>
70       <arg><replaceable>....</replaceable></arg>
71     </cmdsynopsis>
72   </refsynopsisdiv>
73
74
75   <refsect1 id="introduction">
76     <title>Introduction</title>
77     <para>
78       <application>xsltproc</application> is a command line tool for applying
79       <acronym>XSLT</acronym> stylesheets to <acronym>XML</acronym>
80       documents. It is part of <application>libxslt</application>, the XSLT C
81       library for GNOME. While it was developed as part of the GNOME project, it
82       can operate independently of the GNOME desktop.
83    </para>
84
85     <para>
86       <application>xsltproc</application> is invoked from the command line with
87       the name of the stylesheet to be used followed by the name of the file or
88       files to which the stylesheet is to be applied.
89     </para>
90
91     <para>
92       If a stylesheet is included in an <acronym>XML</acronym> document with a
93       Stylesheet Processing Instruction, no stylesheet need be named at the
94       command line. <application>xsltproc</application> will automatically
95       detect the included stylesheet and use it.
96     </para>
97
98     <para>
99       By default, output is to stdout. You can specify a file for output using
100       the <option>-o</option> option.
101     </para>
102   </refsect1>
103
104   <refsect1 id="options">
105     <title>Options</title>
106     
107     <para>
108       <option>-V</option> or <option>--version</option> - Show the version of
109       <application>libxml</application> and <application>libxslt</application> used.
110     </para>
111
112     <para>
113       <option>-v</option> or <option>--verbose</option> - Output each step taken
114       by <application>xsltproc</application> in processing the stylesheet and the document.
115     </para>
116
117     <para>
118       <option>-o</option> or <option>--output</option>
119       <replaceable>file</replaceable> - Direct output to the file named
120       <replaceable>file</replaceable>. For multiple outputs, also known as
121       "chunking", <option>-o</option> <option>directory/</option> directs the
122       output files to a specified directory. The directory must already exist.
123     </para>
124
125     <para>
126       <option>--timing</option> - Display the time used for parsing the
127       stylesheet, parsing the document and applying the stylesheet and saving
128       the result. Displayed in milliseconds.
129     </para>
130
131     <para>
132       <option>--repeat</option> - Run the transformation 20 times. Used for
133       timing tests.
134     </para>
135
136     <para>
137       <option>--debug</option> - Output an <acronym>XML</acronym> tree of the
138       transformed document for debugging purposes.
139     </para>
140
141     <para>
142       <option>--novalid</option> - Skip loading the document's <acronym>DTD</acronym>.
143     </para>
144
145     <para>
146       <option>--noout</option> - Do not output the result.
147     </para>
148
149     <para>
150       <option>--maxdepth</option> <replaceable>value</replaceable> - Adjust the
151       maximum depth of the template stack before
152       <application>libxslt</application> concludes it is in an infinite
153       loop. The default is 500.
154     </para>
155
156     <para>
157       <option>--html</option> - The input document is an <acronym>HTML</acronym>
158       file.
159     </para>
160
161     <para>
162       <option>--docbook</option> - The input document is DocBook
163       <acronym>SGML</acronym>.
164     </para>
165
166     <para>
167       <option>--param</option> <replaceable>name</replaceable>
168       <replaceable>value</replaceable> - Pass a parameter of name
169       <replaceable>name</replaceable> and value
170       <replaceable>value</replaceable> to the stylesheet. You may pass multiple
171       name/value pairs up to a maximum of 8.
172
173       <note>
174         <para>
175           If the value being passed is a string rather than a node identifier,
176           it must be escaped in quotes, as follows:
177         </para>
178         <para>
179           xsltproc --param rootid '"introduction"'
180           <replaceable>stylesheet</replaceable> <replaceable>file</replaceable>
181
182         </para>
183       </note>
184     </para>
185
186     <para>
187       <option>--nonet</option> - Do not use the Internet to fetch DTD's or
188       entities.
189     </para>
190
191     <para>
192       <option>--warnnet</option> - Output notification when DTD's or entities
193       are fetched over the Internet.
194     </para>
195
196     <para>
197       <option>--catalogs</option> - Use catalogs to resolve the location of
198       external entities. This speeds DTD resolution. By having a
199       catalog file point to a local version of the DTD,
200       <application>xsltproc</application> does not have to use the
201       Internet to fetch the DTD. <application>xsltproc</application>
202       uses the catalog identified by the environmental variable
203       <envar>SGML_CATALOG_FILES</envar>.
204     </para>
205
206     <para>
207       <option>--xinclude</option> - Process the input document using the
208       Xinclude specification. More details on this can be found in the Xinclude
209       specification: <ulink
210       url="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</ulink>
211     </para>
212     
213     <para>
214       <option>--profile</option> or <option>--norman</option> - Output profiling
215       information detailing the amount of time spent in each part of the
216       stylesheet. This is useful in optimizing stylesheet performance.
217     </para>
218   </refsect1>
219
220   <refsect1 id="moreinfo">
221     <title>More Information</title>
222     <para>
223       <itemizedlist>
224         <listitem>
225           <para><application>libxml web page: </application><ulink url="http://www.xmlsoft.org/">http://www.xmlsoft.org/</ulink></para>
226         </listitem>
227         <listitem>
228           <para>W3C <acronym>XSLT page: </acronym><ulink url="http://www.w3.org/TR/xslt">http://www.w3.org/TR/xslt</ulink></para>
229         </listitem>
230       </itemizedlist>
231     </para>
232   </refsect1>
233 </refentry>