1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-11-27 16:21:14 +03:00
Files
libxslt/doc/xsltproc.xml
Daniel Veillard 5b4f56032b new update from Daniel Leidert Daniel
* doc/xsltproc.1 doc/xsltproc.xml: new update from Daniel Leidert
Daniel
2006-02-21 19:22:15 +00:00

494 lines
14 KiB
XML

<?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>
<releaseinfo>This is release 0.4 of the xsltproc Manual.</releaseinfo>
<!-- date should be the date of the latest change or the release version -->
<date>2006-02-20</date>
</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>--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">"PATHS"</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>
<group choice='opt'>
<arg choice='plain'><option>--profile</option></arg>
<arg choice='plain'><option>--norman</option></arg>
</group>
<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="norepeat"><replaceable>XML-FILE</replaceable></arg>
<arg choice="plain" rep="norepeat">-</arg>
</group>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 id="introduction">
<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 <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>
&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>
<para>
More information can be found at the <application>libxml</application> web pages
at <ulink url="http://www.xmlsoft.org/"/> and the W3C <acronym>XSLT</acronym>
pages at <ulink url="http://www.w3.org/TR/xslt"/>.
</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 <application>libxslt</application> concludes it is in an
infinite loop. The default is 500.
</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. <emphasis role="bold">Note:</emphasis> The given
directory <emphasis role="bold">must</emphasis>
already exist.
</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 rather than a node identifier,
use <option>--stringparam</option> instead.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--path <replaceable>"PATHS"</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 paramenter 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 <application>libxml</application>
and <application>libxslt</application> 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="envar">
<title>ENVIRONMENT</title>
<variablelist>
<varlistentry>
<term><envar>SGML_CATALOG_FILES</envar></term>
<listitem>
<para>...</para>
</listitem>
</varlistentry>
<varlistentry>
<term><envar>XML_CATALOG_FILES</envar></term>
<listitem>
<para>...</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="return">
<title>DIAGNOSTICS</title>
<para>
&xsltproc;'s 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>
</variablelist>
</refsect1>
</refentry>