File: xsltproc.xml

package info (click to toggle)
libxslt 1.1.12-8
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 22,436 kB
  • ctags: 5,723
  • sloc: xml: 56,075; ansic: 26,762; sh: 10,750; makefile: 4,521; python: 2,975; perl: 34
file content (377 lines) | stat: -rw-r--r-- 10,863 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl"
   href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
]>

<refentry>
  <refentryinfo>
    <title>xsltproc Manual</title>
    <copyright>
      <year>2001, 2002</year>
    </copyright>
    <author>
      <firstname>John</firstname>
      <surname>Fleck</surname>
    </author>
    <address><email>jfleck@inkstain.net</email></address>
    
    <releaseinfo>This is release 0.4 of the xsltproc Manual.</releaseinfo>
  </refentryinfo>

  <refmeta>
    <refentrytitle>xsltproc</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>xsltproc</refname>
    <refpurpose>command line xslt processor</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>xsltproc</command>
      <group>
	<arg>-V</arg>
	<arg>-v</arg>
	<arg>-o <replaceable>file</replaceable></arg>
	<arg>--timing</arg>
	<arg>--repeat</arg>
	<arg>--debug</arg>
	<arg>--novalid</arg>
	<arg>--noout</arg>
	<arg>--maxdepth <replaceable>val</replaceable></arg>
	<arg>--html</arg>
	<arg>--param <replaceable>name</replaceable> <replaceable>value</replaceable></arg>
	<arg>--stringparam <replaceable>name</replaceable> <replaceable>value</replaceable></arg>
	<arg>--nonet</arg>
	<arg>--path <replaceable>paths</replaceable></arg>
	<arg>--load-trace</arg>
	<arg>--catalogs</arg>
	<arg>--xinclude</arg>
	<arg>--profile</arg>
	<arg>--dumpextensions</arg>
	<arg>--nowrite</arg>
	<arg>--nomkdir</arg>
	<arg>--writesubtree</arg>
      </group>
      <arg><option><replaceable>stylesheet</replaceable></option></arg>
      <arg><replaceable>file1</replaceable></arg>
      <arg><replaceable>file2</replaceable></arg>
      <arg><replaceable>....</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>


  <refsect1 id="introduction">
    <title>Introduction</title>
    <para>
      <application>xsltproc</application> is a command line tool for applying
      <acronym>XSLT</acronym> stylesheets to <acronym>XML</acronym>
      documents. It is part of <application>libxslt</application>, the XSLT C
      library for GNOME. While it was developed as part of the GNOME project, it
      can operate independently of the GNOME desktop.
   </para>

    <para>
      <application>xsltproc</application> is invoked from the command line with
      the name of the stylesheet to be used followed by the name of the file or
      files to which the stylesheet is to be applied. It will use the standard
      input if a filename provided is - .
    </para>

    <para>
      If a stylesheet is included in an <acronym>XML</acronym> document with a
      Stylesheet Processing Instruction, no stylesheet need be named at the
      command line. <application>xsltproc</application> will automatically
      detect the included stylesheet and use it.
    </para>

    <para>
      By default, output is to stdout. You can specify a file for output using
      the <option>-o</option> option.
    </para>
  </refsect1>

  <refsect1 id="options">
    <title>Command Line Options</title>
    
    <variablelist>
      <varlistentry>
	<term><option>-V</option> or <option>--version</option></term>
	<listitem>
	  <simpara>Show the version of
      <application>libxml</application> and <application>libxslt</application> used.
    </simpara>
	</listitem>
      </varlistentry>

    
      <varlistentry>
	<term>
      <option>-v</option> or <option>--verbose</option></term>
	<listitem>
	  <simpara>Output each step taken
      by <application>xsltproc</application> in processing the stylesheet and the document.
    </simpara>
	</listitem>
      </varlistentry>

    
      <varlistentry>
	<term>
      <option>-o</option> or <option>--output</option> <replaceable>file</replaceable></term>
	<listitem>
	  <simpara>Direct output to the file named
      <replaceable>file</replaceable>. For multiple outputs, also known as
      "chunking", <option>-o</option> <option>directory/</option> directs the
      output files to a specified directory. The directory must already exist.
    </simpara>
	</listitem>
      </varlistentry>

    
      <varlistentry>
	<term>
      <option>--timing</option></term>
	<listitem>
	  <simpara>Display the time used for parsing the
      stylesheet, parsing the document and applying the stylesheet and saving
      the result. Displayed in milliseconds.
    </simpara>
	</listitem>
      </varlistentry>

    
      <varlistentry>
	<term>
      <option>--repeat</option></term>
	<listitem>
	  <simpara>Run the transformation 20 times. Used for
      timing tests.
    </simpara>
	</listitem>
      </varlistentry>

    
      <varlistentry>
	<term>
      <option>--debug</option></term>
	<listitem>
	  <simpara>Output an <acronym>XML</acronym> tree of the
      transformed document for debugging purposes.
    </simpara>
	</listitem>
      </varlistentry>

    
      <varlistentry>
	<term>
      <option>--novalid</option></term>
	<listitem>
	  <simpara>Skip loading the document's <acronym>DTD</acronym>.
    </simpara>
	</listitem>
      </varlistentry>

    
      <varlistentry>
	<term>
      <option>--noout</option></term>
	<listitem>
	  <simpara>Do not output the result.
    </simpara>
	</listitem>
      </varlistentry>

    
      <varlistentry>
	<term>
      <option>--maxdepth</option> <replaceable>value</replaceable></term>
	<listitem>
	  <simpara>Adjust the
      maximum depth of the template stack before
      <application>libxslt</application> concludes it is in an infinite
      loop. The default is 500.
    </simpara>
	</listitem>
      </varlistentry>

    
      <varlistentry>
	<term>
      <option>--html</option></term>
	<listitem>
	  <simpara>The input document is an <acronym>HTML</acronym>
      file.
    </simpara>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
      <option>--param</option> <replaceable>name</replaceable> <replaceable>value</replaceable></term>
	<listitem>
	  <simpara>Pass a parameter of name
      <replaceable>name</replaceable> and value
      <replaceable>value</replaceable> to the stylesheet. You may pass multiple
      name/value pairs up to a maximum of 32. If the value being passed is a
	    string rather than a node identifier, use
	    <option>--stringparam</option> instead.
	  </simpara>
      	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <option>--stringparam</option> <replaceable>name</replaceable> <replaceable>value</replaceable></term>
	<listitem>
	  <simpara>Pass a paramenter of name <replaceable>name</replaceable> and
	    value <replaceable>value</replaceable> where
	    <replaceable>value</replaceable> is a string rather than a node
	    identifier. (Note: The string must be utf-8.) </simpara>
	</listitem>
      </varlistentry>
    
      <varlistentry>
	<term>
      <option>--nonet</option></term>
	<listitem>
	  <simpara>Do not use the Internet to fetch DTD's,
      entities or documents.
    </simpara>
	</listitem>
      </varlistentry>
    
      <varlistentry>
	<term> <option>--path</option> <replaceable>paths</replaceable></term>
	<listitem>
	  <simpara>
	    Use the list (separated by space or column) of filesystem paths 
	specified by <replaceable>paths</replaceable> to load
        <acronym>DTDs</acronym>, entities or documents.
	  </simpara>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><option>--load-trace</option></term>
	<listitem>
	  <simpara>
	    Display to stderr all the documents loaded during the processing.
	  </simpara>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
      <option>--catalogs</option></term>
	<listitem>
	  <simpara>Use the <acronym>SGML</acronym> catalog specified in
      <envar>SGML_CATALOG_FILES</envar> to resolve the location of
	    external entities. By default, <application>xsltproc</application>
	    looks for the catalog specified in
      <envar>XML_CATALOG_FILES</envar>. If that is not specified, it uses
      <filename>/etc/xml/catalog</filename>.
    </simpara>
	</listitem>
      </varlistentry>

    
      <varlistentry>
	<term>
      <option>--xinclude</option></term>
	<listitem>
	  <simpara>Process the input document using the
      Xinclude specification. More details on this can be found in the Xinclude
      specification: <ulink
      url="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</ulink>
    </simpara>
	</listitem>
      </varlistentry>
    
    
      <varlistentry>
	<term>
      <option>--profile</option> or <option>--norman</option></term>
	<listitem>
	  <simpara>Output profiling
      information detailing the amount of time spent in each part of the
      stylesheet. This is useful in optimizing stylesheet performance.
    </simpara>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
      <option>--dumpextensions</option></term>
	<listitem>
	  <simpara>Dumps the list of all registered extensions on stdout.
    </simpara>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
      <option>--nowrite</option></term>
	<listitem>
	  <simpara>Refuses to write to any file or resource.
    </simpara>
	</listitem>
      </varlistentry>
    
      <varlistentry>
	<term>
      <option>--nomkdir</option></term>
	<listitem>
	  <simpara>Refuses to create directories.
    </simpara>
	</listitem>
      </varlistentry>
    
      <varlistentry>
	<term>
      <option>--writesubtree</option> <replaceable>path</replaceable></term>
	<listitem>
	  <simpara>Allow file write only within the
	  <replaceable>path</replaceable> subtree.
    </simpara>
	</listitem>
      </varlistentry>
    
    
    </variablelist>
  </refsect1>

  <refsect1 id="return">
    <title>Return values</title>
    <para><application>xsltproc</application>'s return codes provide information
    that can be used when calling it from scripts.</para>

    <para>0: normal</para>
    <para>1: no argument</para>
    <para>2: too many parameters</para>
    <para>3: unknown option</para>
    <para>4: failed to parse the stylesheet</para>
    <para>5: error in the stylesheet</para>
    <para>6: error in one of the documents</para>
    <para>7: unsupported xsl:output method</para>
    <para>8: string parameter contains both quote and double-quotes</para>
    <para>9: internal processing error</para>
    <para>10: processing was stopped by a terminating message</para>
  </refsect1>



  <refsect1 id="moreinfo">
    <title>More Information</title>
    
	  <para><application>libxml web page: </application><ulink url="http://www.xmlsoft.org/">http://www.xmlsoft.org/</ulink></para>
	
	  <para>W3C <acronym>XSLT page: </acronym><ulink url="http://www.w3.org/TR/xslt">http://www.w3.org/TR/xslt</ulink></para>
	
  
  </refsect1>
</refentry>