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" [
8 <title>xsltproc Manual</title>
13 <firstname>John</firstname>
14 <surname>Fleck</surname>
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>.
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
32 <releaseinfo>This is release 0.1 of the xsltproc Manual.</releaseinfo>
36 <refentrytitle>xsltproc</refentrytitle>
37 <manvolnum>1</manvolnum>
41 <refname>xsltproc</refname>
42 <refpurpose>command line xslt processor</refpurpose>
47 <command>xsltproc</command>
51 <arg>-o <replaceable>file</replaceable></arg>
57 <arg>--maxdepth <replaceable>val</replaceable></arg>
60 <arg>--param <replaceable>name</replaceable> <replaceable>value</replaceable></arg>
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>
75 <refsect1 id="introduction">
76 <title>Introduction</title>
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.
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.
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.
99 By default, output is to stdout. You can specify a file for output using
100 the <option>-o</option> option.
104 <refsect1 id="options">
105 <title>Options</title>
108 <option>-V</option> or <option>--version</option> - Show the version of
109 <application>libxml</application> and <application>libxslt</application> used.
113 <option>-v</option> or <option>--verbose</option> - Output each step taken
114 by <application>xsltproc</application> in processing the stylesheet and the document.
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.
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.
132 <option>--repeat</option> - Run the transformation 20 times. Used for
137 <option>--debug</option> - Output an <acronym>XML</acronym> tree of the
138 transformed document for debugging purposes.
142 <option>--novalid</option> - Skip loading the document's <acronym>DTD</acronym>.
146 <option>--noout</option> - Do not output the result.
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.
157 <option>--html</option> - The input document is an <acronym>HTML</acronym>
162 <option>--docbook</option> - The input document is DocBook
163 <acronym>SGML</acronym>.
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.
175 If the value being passed is a string rather than a node identifier,
176 it must be escaped in quotes, as follows:
179 xsltproc --param rootid '"introduction"'
180 <replaceable>stylesheet</replaceable> <replaceable>file</replaceable>
187 <option>--nonet</option> - Do not use the Internet to fetch DTD's or
192 <option>--warnnet</option> - Output notification when DTD's or entities
193 are fetched over the Internet.
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>.
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>
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.
220 <refsect1 id="moreinfo">
221 <title>More Information</title>
225 <para><application>libxml web page: </application><ulink url="http://www.xmlsoft.org/">http://www.xmlsoft.org/</ulink></para>
228 <para>W3C <acronym>XSLT page: </acronym><ulink url="http://www.w3.org/TR/xslt">http://www.w3.org/TR/xslt</ulink></para>