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 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573
|
<?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" [
<!ENTITY xsltproc "<command>xsltproc</command>">
]>
<refentry>
<refentryinfo>
<title>xsltproc Manual</title>
<productname>libxslt</productname>
<copyright>
<year>2001</year>
<year>2002</year>
</copyright>
<author>
<firstname>John</firstname>
<surname>Fleck</surname>
<affiliation>
<address>
<email>jfleck@inkstain.net</email>
</address>
</affiliation>
</author>
<!-- date should be the date of the latest change or the release version -->
<date>$Date$</date>
<!-- still a bit buggy output, will talk to docbook-xsl upstream to fix this -->
<!-- <releaseinfo>This is release 0.4 of the xsltproc Manual.</releaseinfo> -->
<!-- <edition>0.4</edition> -->
</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 choice="opt">
<group choice="opt">
<arg choice="plain"><option>-V</option></arg>
<arg choice="plain"><option>--version</option></arg>
</group>
<group choice="opt">
<arg choice="plain"><option>-v</option></arg>
<arg choice="plain"><option>--verbose</option></arg>
</group>
<group choice="opt">
<group choice="req">
<arg choice="plain"><option>-o</option></arg>
<arg choice="plain"><option>--output</option></arg>
</group>
<group choice="req">
<arg choice="plain"><replaceable class="option">FILE</replaceable></arg>
<arg choice="plain"><replaceable class="option">DIRECTORY</replaceable></arg>
</group>
</group>
<arg choice="plain"><option>--timing</option></arg>
<arg choice="plain"><option>--repeat</option></arg>
<arg choice="plain"><option>--debug</option></arg>
<arg choice="plain"><option>--novalid</option></arg>
<arg choice="plain"><option>--noout</option></arg>
<arg choice="plain"><option>--maxdepth <replaceable class="option">VALUE</replaceable></option></arg>
<arg choice="plain"><option>--html</option></arg>
<arg choice="plain"><option>--encoding
<replaceable class="option">ENCODING</replaceable>
</option></arg>
<arg choice="plain"><option>--param
<replaceable class="option">PARAMNAME</replaceable>
<replaceable class="option">PARAMVALUE</replaceable>
</option></arg>
<arg choice="plain"><option>--stringparam
<replaceable class="option">PARAMNAME</replaceable>
<replaceable class="option">PARAMVALUE</replaceable>
</option></arg>
<arg choice="plain"><option>--nonet</option></arg>
<arg choice="plain"><option>--path "<replaceable class="option">PATH(S)</replaceable>"</option></arg>
<arg choice="plain"><option>--load-trace</option></arg>
<arg choice="plain"><option>--catalogs</option></arg>
<arg choice="plain"><option>--xinclude</option></arg>
<arg choice="plain">
<group choice="opt">
<arg choice="plain"><option>--profile</option></arg>
<arg choice="plain"><option>--norman</option></arg>
</group>
</arg>
<arg choice="plain"><option>--dumpextensions</option></arg>
<arg choice="plain"><option>--nowrite</option></arg>
<arg choice="plain"><option>--nomkdir</option></arg>
<arg choice="plain"><option>--writesubtree <replaceable>PATH</replaceable></option></arg>
<arg choice="plain"><option>--nodtdattr</option></arg>
</group>
<arg choice="opt"><replaceable>STYLESHEET</replaceable></arg>
<group choice="req">
<arg choice="plain" rep="repeat"><replaceable>XML-FILE</replaceable></arg>
<arg choice="plain" rep="norepeat">-</arg>
</group>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 id="description">
<title>DESCRIPTION</title>
<para>
&xsltproc; is a command line tool for applying <acronym>XSLT</acronym>
stylesheets to <acronym>XML</acronym> documents. It is part
of <citerefentry>
<refentrytitle>libxslt</refentrytitle>
<manvolnum>3</manvolnum>
</citerefentry>, 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>
&xsltproc; 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 <emphasis role="bold">-</emphasis> .
</para>
<para>
If a stylesheet is included in an <acronym>XML</acronym> document with a
Stylesheet Processing Instruction, no stylesheet need to be named at the
command line. &xsltproc; will automatically detect the included stylesheet
and use it.
</para>
<para>
By default, output is to <filename class="devicefile">stdout</filename>.
You can specify a file for output using
the <option>-o</option> or <option>--output</option> option.
</para>
</refsect1>
<refsect1 id="options">
<title>OPTIONS</title>
<para>
&xsltproc; accepts the following options (in alphabetical order):
</para>
<variablelist>
<varlistentry>
<term><option>--catalogs</option></term>
<listitem>
<para>
Use the <acronym>SGML</acronym> catalog specified
in <envar>SGML_CATALOG_FILES</envar> to resolve the location of
external entities. By default, &xsltproc; looks for the catalog
specified in <envar>XML_CATALOG_FILES</envar>. If that is not
specified, it uses <filename>/etc/xml/catalog</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--debug</option></term>
<listitem>
<para>
Output an <acronym>XML</acronym> tree of the transformed document
for debugging purposes.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--dumpextensions</option></term>
<listitem>
<para>
Dumps the list of all registered extensions
on <filename class="devicefile">stdout</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--html</option></term>
<listitem>
<para>The input document is an <acronym>HTML</acronym> file.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--load-trace</option></term>
<listitem>
<para>
Display all the documents loaded during the processing
to <filename class="devicefile">stderr</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--maxdepth <replaceable>VALUE</replaceable></option></term>
<listitem>
<para>
Adjust the maximum depth of the template stack
before <citerefentry>
<refentrytitle>libxslt</refentrytitle>
<manvolnum>3</manvolnum>
</citerefentry> concludes it is in an infinite loop. The default is 3000.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--nodtdattr</option></term>
<listitem>
<para>
Do not apply default attributes from the
document's <acronym>DTD</acronym>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--nomkdir</option></term>
<listitem>
<para>Refuses to create directories.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--nonet</option></term>
<listitem>
<para>
Do not use the Internet to fetch <acronym>DTD</acronym>s, entities
or documents.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--noout</option></term>
<listitem>
<para>Do not output the result.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--novalid</option></term>
<listitem>
<para>Skip loading the document's <acronym>DTD</acronym>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--nowrite</option></term>
<listitem>
<para>Refuses to write to any file or resource.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-o</option> or <option>--output</option>
<replaceable>FILE</replaceable> | <replaceable>DIRECTORY</replaceable>
</term>
<listitem>
<para>
Direct output to the given <replaceable>FILE</replaceable>. Using
the option with a <replaceable>DIRECTORY</replaceable> directs the
output files to the specified directory. This can be
useful for multiple outputs (also known as "chunking") or manpage
processing.
</para>
<important>
<para>
The given directory <emphasis role="bold">must</emphasis> already exist.
</para>
</important>
<note>
<para>
Make sure that <replaceable>FILE</replaceable>
and <replaceable>DIRECTORY</replaceable> follow the <quote>URI reference
computation</quote> as described in RFC 2396 and laters. This means, that
e.g. <option>-o directory</option> will maybe not work,
but <option>-o directory/</option> will.
</para>
</note>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--encoding <replaceable>ENCODING</replaceable></option>
</term>
<listitem>
<para>
Allow to specify the encoding for the input.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--param <replaceable>PARAMNAME</replaceable> <replaceable>PARAMVALUE</replaceable></option>
</term>
<listitem>
<para>
Pass a parameter of name <replaceable>PARAMNAME</replaceable> and value
<replaceable>PARAMVALUE</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, you can use <option>--stringparam</option> instead, to avoid
additional quote characters that appear in string expressions. Note:
the XPath expression must be UTF-8 encoded.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--path "<replaceable>PATH(S)</replaceable>"</option></term>
<listitem>
<para>
Use the (space- or colon-separated) list of filesystem paths specified
by <replaceable>PATHS</replaceable> to load <acronym>DTD</acronym>s,
entities or documents. Enclose space-separated lists by quotation marks.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--profile</option> or <option>--norman</option></term>
<listitem>
<para>
Output profiling information detailing the amount of time spent in
each part of the stylesheet. This is useful in optimizing stylesheet
performance.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--repeat</option></term>
<listitem>
<para>Run the transformation 20 times. Used for timing tests.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--stringparam <replaceable>PARAMNAME</replaceable> <replaceable>PARAMVALUE</replaceable></option>
</term>
<listitem>
<para>
Pass a parameter of name <replaceable>PARAMNAME</replaceable> and
value <replaceable>PARAMVALUE</replaceable>
where <replaceable>PARAMVALUE</replaceable> is a string rather than a
node identifier. <emphasis role="bold">Note:</emphasis> The string
must be UTF-8 encoded.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--timing</option></term>
<listitem>
<para>
Display the time used for parsing the stylesheet, parsing the document
and applying the stylesheet and saving the result. Displayed in
milliseconds.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option> or <option>--verbose</option></term>
<listitem>
<para>
Output each step taken by &xsltproc; in processing the stylesheet
and the document.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-V</option> or <option>--version</option></term>
<listitem>
<para>
Show the version of <citerefentry>
<refentrytitle>libxml</refentrytitle>
<manvolnum>3</manvolnum>
</citerefentry> and <citerefentry>
<refentrytitle>libxslt</refentrytitle>
<manvolnum>3</manvolnum>
</citerefentry> used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--writesubtree <replaceable>PATH</replaceable></option></term>
<listitem>
<para>
Allow file write only within the <replaceable>PATH</replaceable>
subtree.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--xinclude</option></term>
<listitem>
<para>
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/"/>
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="environment">
<title>ENVIRONMENT</title>
<variablelist>
<varlistentry>
<term><envar>SGML_CATALOG_FILES</envar></term>
<listitem>
<para><acronym>SGML</acronym> catalog behavior can be changed by redirecting
queries to the user's own set of catalogs. This can be done by setting
the <envar>SGML_CATALOG_FILES</envar> environment variable to a list
of catalogs. An empty one should deactivate loading the
default <filename>/etc/sgml/catalog</filename> catalog.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><envar>XML_CATALOG_FILES</envar></term>
<listitem>
<para><acronym>XML</acronym> catalog behavior can be changed by redirecting
queries to the user's own set of catalogs. This can be done by setting
the <envar>XML_CATALOG_FILES</envar> environment variable to a list
of catalogs. An empty one should deactivate loading the
default <filename>/etc/xml/catalog</filename> catalog.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="diagnostics">
<title>DIAGNOSTICS</title>
<para>
&xsltproc; return codes provide information that can be used when
calling it from scripts.
</para>
<variablelist>
<varlistentry>
<term><errorcode>0</errorcode></term>
<listitem>
<para>No error (normal operation)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>1</errorcode></term>
<listitem>
<para>No argument</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>2</errorcode></term>
<listitem>
<para>Too many parameters</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>3</errorcode></term>
<listitem>
<para>Unknown option</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>4</errorcode></term>
<listitem>
<para>Failed to parse the stylesheet</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>5</errorcode></term>
<listitem>
<para>Error in the stylesheet</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>6</errorcode></term>
<listitem>
<para>Error in one of the documents</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>7</errorcode></term>
<listitem>
<para>Unsupported xsl:output method</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>8</errorcode></term>
<listitem>
<para>String parameter contains both quote and double-quotes</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>9</errorcode></term>
<listitem>
<para>Internal processing error</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>10</errorcode></term>
<listitem>
<para>Processing was stopped by a terminating message</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>11</errorcode></term>
<listitem>
<para>Could not write the result to the output file</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="seealso">
<title>SEE ALSO</title>
<para><citerefentry>
<refentrytitle>libxml</refentrytitle>
<manvolnum>3</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>libxslt</refentrytitle>
<manvolnum>3</manvolnum>
</citerefentry>
</para>
<para>
More information can be found at
<itemizedlist>
<listitem>
<para><citerefentry>
<refentrytitle>libxml</refentrytitle>
<manvolnum>3</manvolnum>
</citerefentry> web page <ulink url="http://www.xmlsoft.org/"/>
</para>
</listitem>
<listitem>
<para>W3C <acronym>XSLT</acronym> page <ulink url="http://www.w3.org/TR/xslt"/>
</para>
</listitem>
</itemizedlist>
</para>
</refsect1>
</refentry>
|