|
Packit |
e4b6da |
<sect1 id="xsltproc">
|
|
Packit |
e4b6da |
<sect1info>
|
|
Packit |
e4b6da |
<abstract role="texinfo-node">
|
|
Packit |
e4b6da |
<para>How to run the docbook2X XSLT stylesheets</para>
|
|
Packit |
e4b6da |
</abstract>
|
|
Packit |
e4b6da |
</sect1info>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<title>The XSLT stylesheets</title>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<indexterm><primary>XSLT processor</primary></indexterm>
|
|
Packit |
e4b6da |
<indexterm><primary>libxslt</primary></indexterm>
|
|
Packit |
e4b6da |
<indexterm><primary>SAXON</primary></indexterm>
|
|
Packit |
e4b6da |
<indexterm><primary>catalog</primary></indexterm>
|
|
Packit |
e4b6da |
<indexterm><primary>&db2x_xsltproc;</primary></indexterm>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
docbook2X uses a XSLT 1.0 processor to run its stylesheets.
|
|
Packit |
e4b6da |
docbook2X comes with a wrapper script,
|
|
Packit |
e4b6da |
&db2x_xsltproc_ref;, that invokes the XSLT processor,
|
|
Packit |
e4b6da |
but you can invoke the XSLT processor in any other
|
|
Packit |
e4b6da |
way you wish.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
The stylesheets are described in
|
|
Packit |
e4b6da |
<olink targetdocent="docbook2man-xslt">the man-pages stylesheets
|
|
Packit |
e4b6da |
reference</olink>
|
|
Packit |
e4b6da |
and <olink targetdocent="docbook2texi-xslt">the Texinfo stylesheets
|
|
Packit |
e4b6da |
reference</olink><footnote role="html">
|
|
Packit |
e4b6da |
<para>The HTML versions of these documents are not in the docbook2X
|
|
Packit |
e4b6da |
distribution, because they are too large. Your alternatives are:
|
|
Packit |
e4b6da |
(i) use the HTML version on the docbook2X Web site, (ii) use the Texinfo
|
|
Packit |
e4b6da |
version that is distributed with docbook2X, or (iii) generate the HTML
|
|
Packit |
e4b6da |
yourself with the DocBook XSL stylesheets. To do the last, simply
|
|
Packit |
e4b6da |
type <userinput>make html</userinput> in
|
|
Packit |
e4b6da |
the <filename>xslt/documentation/</filename> directory.</para>
|
|
Packit |
e4b6da |
</footnote>.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<indexterm><primary>pure XSLT</primary></indexterm>
|
|
Packit |
e4b6da |
<indexterm><primary><command>xsltproc</command></primary></indexterm>
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
Pure-XSLT implementations of &db2x_manxml;
|
|
Packit |
e4b6da |
and &db2x_texixml; also exist.
|
|
Packit |
e4b6da |
They may be used as follows (assuming libxslt as the XSLT processor).
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<example id="xsltproc.db2x_manxml">
|
|
Packit |
e4b6da |
<title>Convert to man pages using pure-XSLT &db2x_manxml;</title>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
><prompt>$ </prompt><userinput>xsltproc -o mydoc.mxml \
|
|
Packit |
e4b6da |
<replaceable>docbook2X-path</replaceable>/xslt/man/docbook.xsl \
|
|
Packit |
e4b6da |
mydoc.xml</userinput>
|
|
Packit |
e4b6da |
<prompt>$ </prompt><userinput>xsltproc \
|
|
Packit |
e4b6da |
<replaceable>docbook2X-path</replaceable>/xslt/backend/db2x_manxml.xsl \
|
|
Packit |
e4b6da |
mydoc.mxml</userinput></screen>
|
|
Packit |
e4b6da |
</example>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<example id="xsltproc.db2x_texixml">
|
|
Packit |
e4b6da |
<title>Convert to Texinfo using Pure-XSLT &db2x_texixml;</title>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
><prompt>$ </prompt><userinput>xsltproc -o mydoc.txml \
|
|
Packit |
e4b6da |
<replaceable>docbook2X-path</replaceable>/xslt/texi/docbook.xsl \
|
|
Packit |
e4b6da |
mydoc.xml</userinput>
|
|
Packit |
e4b6da |
<prompt>$ </prompt><userinput>xsltproc \
|
|
Packit |
e4b6da |
<replaceable>docbook2X-path</replaceable>/xslt/backend/db2x_texixml.xsl \
|
|
Packit |
e4b6da |
mydoc.txml</userinput></screen>
|
|
Packit |
e4b6da |
</example>
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
Here, &xsltproc_cmd; is used instead of &db2x_xsltproc;, since
|
|
Packit |
e4b6da |
if you are in a situtation where you cannot use the Perl implementation
|
|
Packit |
e4b6da |
of &db2x_manxml;, you probably cannot use &db2x_xsltproc; either.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
If for portability reasons you prefer not to use the file-system path
|
|
Packit |
e4b6da |
to the docbook2X files, you can use the XML catalog
|
|
Packit |
e4b6da |
provided in <filename>xslt/catalog.xml</filename>
|
|
Packit |
e4b6da |
and the global URIs contained therein.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refentry id="db2x_xsltproc">
|
|
Packit |
e4b6da |
<indexterm><primary>XSLT processor</primary></indexterm>
|
|
Packit |
e4b6da |
<indexterm><primary>libxslt</primary></indexterm>
|
|
Packit |
e4b6da |
<indexterm><primary>&db2x_xsltproc;</primary></indexterm>
|
|
Packit |
e4b6da |
<refmeta>
|
|
Packit |
e4b6da |
<refentrytitle id="db2x_xsltproc_name">&db2x_xsltproc;</refentrytitle>
|
|
Packit |
e4b6da |
<manvolnum>1</manvolnum>
|
|
Packit |
e4b6da |
</refmeta>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refnamediv>
|
|
Packit |
e4b6da |
<refname>&db2x_xsltproc;</refname>
|
|
Packit |
e4b6da |
<refpurpose>XSLT processor invocation wrapper</refpurpose>
|
|
Packit |
e4b6da |
</refnamediv>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsynopsisdiv>
|
|
Packit |
e4b6da |
<cmdsynopsis>
|
|
Packit |
e4b6da |
<command>db2x_xsltproc</command>
|
|
Packit |
e4b6da |
<arg><replaceable>options</replaceable></arg>
|
|
Packit |
e4b6da |
<arg choice="plain"><replaceable>xml-document</replaceable></arg>
|
|
Packit |
e4b6da |
</cmdsynopsis>
|
|
Packit |
e4b6da |
</refsynopsisdiv>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect1>
|
|
Packit |
e4b6da |
<title>Description</title>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
&db2x_xsltproc; invokes the XSLT 1.0 processor for docbook2X.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
This command applies the XSLT stylesheet
|
|
Packit |
e4b6da |
(usually given by the <option>--stylesheet</option> option)
|
|
Packit |
e4b6da |
to the XML document in the file <replaceable>xml-document</replaceable>.
|
|
Packit |
e4b6da |
The result is written to standard output (unless changed with
|
|
Packit |
e4b6da |
<option>--output</option>).
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
To read the source XML document from standard input,
|
|
Packit |
e4b6da |
specify <literal>-</literal> as the input document.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</refsect1>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect1>
|
|
Packit |
e4b6da |
<title>Options</title>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<variablelist>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><option>--version</option></term>
|
|
Packit |
e4b6da |
<listitem><para>
|
|
Packit |
e4b6da |
Display the docbook2X version.
|
|
Packit |
e4b6da |
</para></listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</variablelist>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect2>
|
|
Packit |
e4b6da |
<title>Transformation output options</title>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<variablelist>
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><option>--output <replaceable>file</replaceable></option></term>
|
|
Packit |
e4b6da |
<term><option>-o <replaceable>file</replaceable></option></term>
|
|
Packit |
e4b6da |
<listitem><para>
|
|
Packit |
e4b6da |
Write output to the given file (or URI), instead of standard output.
|
|
Packit |
e4b6da |
</para></listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
</variablelist>
|
|
Packit |
e4b6da |
</refsect2>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect2>
|
|
Packit |
e4b6da |
<title>Source document options</title>
|
|
Packit |
e4b6da |
<variablelist>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><option>--xinclude</option></term>
|
|
Packit |
e4b6da |
<term><option>-I</option></term>
|
|
Packit |
e4b6da |
<listitem><para>
|
|
Packit |
e4b6da |
Process XInclude directives in the source document.
|
|
Packit |
e4b6da |
</para></listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><option>--sgml</option></term>
|
|
Packit |
e4b6da |
<term><option>-S</option></term>
|
|
Packit |
e4b6da |
<listitem>
|
|
Packit |
e4b6da |
<indexterm><primary>SGML</primary></indexterm>
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
Indicate that the input document is SGML instead of XML.
|
|
Packit |
e4b6da |
You need this set this option if <replaceable>xml-document</replaceable>
|
|
Packit |
e4b6da |
is actually a SGML file.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
SGML parsing is implemented by conversion to XML via &sgml2xml; from the
|
|
Packit |
e4b6da |
SP package (or &osx; from the OpenSP package). All tag names in the
|
|
Packit |
e4b6da |
SGML file will be normalized to lowercase (i.e. the <option>-xlower</option>
|
|
Packit |
e4b6da |
option of &sgml2xml; is used). ID attributes are available
|
|
Packit |
e4b6da |
for the stylesheet (i.e. option <option>-xid</option>). In addition,
|
|
Packit |
e4b6da |
any ISO SDATA entities used in the SGML document are automatically converted
|
|
Packit |
e4b6da |
to their XML Unicode equivalents. (This is done by a
|
|
Packit |
e4b6da |
<command>sed</command> filter.)
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
The encoding of the SGML document, if it is not
|
|
Packit |
e4b6da |
<literal>us-ascii</literal>, must be specified with the standard
|
|
Packit |
e4b6da |
SP environment variables: <userinput>SP_CHARSET_FIXED=1
|
|
Packit |
e4b6da |
SP_ENCODING=<replaceable>encoding</replaceable></userinput>.
|
|
Packit |
e4b6da |
(Note that XML files specify their encoding with the XML declaration
|
|
Packit |
e4b6da |
<userinput><?xml version="1.0" encoding="<replaceable>encoding"</replaceable> ?></userinput>
|
|
Packit |
e4b6da |
at the top of the file.)
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
The above conversion options cannot be changed. If you desire different
|
|
Packit |
e4b6da |
conversion options, you should invoke &sgml2xml; manually, and then pass
|
|
Packit |
e4b6da |
the results of that conversion to this program.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
</listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</variablelist>
|
|
Packit |
e4b6da |
</refsect2>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect2>
|
|
Packit |
e4b6da |
<title>Retrieval options</title>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<variablelist>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><option>--catalogs <replaceable>catalog-files</replaceable></option></term>
|
|
Packit |
e4b6da |
<term><option>-C <replaceable>catalog-files</replaceable></option></term>
|
|
Packit |
e4b6da |
<listitem>
|
|
Packit |
e4b6da |
<indexterm><primary>catalog</primary></indexterm>
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
Specify additional XML catalogs to use for resolving Formal
|
|
Packit |
e4b6da |
Public Identifiers or URIs. SGML catalogs are not supported.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
These catalogs are <emphasis>not</emphasis> used for parsing an SGML
|
|
Packit |
e4b6da |
document under the <option>--sgml</option> option. Use
|
|
Packit |
e4b6da |
the environment variable <envar>SGML_CATALOG_FILES</envar> instead
|
|
Packit |
e4b6da |
to specify the catalogs for parsing the SGML document.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><option>--network</option></term>
|
|
Packit |
e4b6da |
<term><option>-N</option></term>
|
|
Packit |
e4b6da |
<listitem><para>
|
|
Packit |
e4b6da |
&db2x_xsltproc; will normally refuse to load
|
|
Packit |
e4b6da |
external resources from the network, for security reasons.
|
|
Packit |
e4b6da |
If you do want to load from the network, set this option.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
Usually you want to have installed locally the relevent DTDs and other
|
|
Packit |
e4b6da |
files, and set up catalogs for them, rather than load them automatically
|
|
Packit |
e4b6da |
from the network.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
</listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</variablelist>
|
|
Packit |
e4b6da |
</refsect2>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect2>
|
|
Packit |
e4b6da |
<title>Stylesheet options</title>
|
|
Packit |
e4b6da |
<variablelist>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><option>--stylesheet <replaceable>file</replaceable></option></term>
|
|
Packit |
e4b6da |
<term><option>-s <replaceable>file</replaceable></option></term>
|
|
Packit |
e4b6da |
<listitem><para>
|
|
Packit |
e4b6da |
Specify the filename (or URI) of the stylesheet to use.
|
|
Packit |
e4b6da |
The special values <literal>man</literal> and <literal>texi</literal>
|
|
Packit |
e4b6da |
are accepted as abbreviations, to specify that
|
|
Packit |
e4b6da |
<replaceable>xml-document</replaceable> is in DocBook and
|
|
Packit |
e4b6da |
should be converted to man pages or Texinfo (respectively).
|
|
Packit |
e4b6da |
</para></listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><option>--param <replaceable>name</replaceable>=<replaceable>expr</replaceable></option></term>
|
|
Packit |
e4b6da |
<term><option>-p <replaceable>name</replaceable>=<replaceable>expr</replaceable></option></term>
|
|
Packit |
e4b6da |
<listitem><para>
|
|
Packit |
e4b6da |
Add or modify a parameter to the stylesheet.
|
|
Packit |
e4b6da |
<replaceable>name</replaceable> is a XSLT parameter name, and
|
|
Packit |
e4b6da |
<replaceable>expr</replaceable> is an XPath expression that evaluates to
|
|
Packit |
e4b6da |
the desired value for the parameter. (This means that strings must be
|
|
Packit |
e4b6da |
quoted, <emphasis>in addition</emphasis> to the usual quoting of shell
|
|
Packit |
e4b6da |
arguments; use <option>--string-param</option> to avoid this.)
|
|
Packit |
e4b6da |
</para></listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><option>--string-param <replaceable>name</replaceable>=<replaceable>string</replaceable></option></term>
|
|
Packit |
e4b6da |
<term><option>-g <replaceable>name</replaceable>=<replaceable>string</replaceable></option></term>
|
|
Packit |
e4b6da |
<listitem><para>
|
|
Packit |
e4b6da |
Add or modify a string-valued parameter to the stylesheet.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
The string must be encoded in UTF-8 (regardless of the locale
|
|
Packit |
e4b6da |
character encoding).
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
</listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</variablelist>
|
|
Packit |
e4b6da |
</refsect2>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect2>
|
|
Packit |
e4b6da |
<title>Debugging and profiling</title>
|
|
Packit |
e4b6da |
<variablelist>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><option>--debug</option></term>
|
|
Packit |
e4b6da |
<term><option>-d</option></term>
|
|
Packit |
e4b6da |
<listitem><para>
|
|
Packit |
e4b6da |
Display, to standard error, logs of what is happening during the
|
|
Packit |
e4b6da |
XSL transformation.
|
|
Packit |
e4b6da |
</para></listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><option>--nesting-limit <replaceable>n</replaceable></option></term>
|
|
Packit |
e4b6da |
<term><option>-D <replaceable>n</replaceable></option></term>
|
|
Packit |
e4b6da |
<listitem><para>
|
|
Packit |
e4b6da |
Change the maximum number of nested calls to XSL templates, used to
|
|
Packit |
e4b6da |
detect potential infinite loops.
|
|
Packit |
e4b6da |
If not specified, the limit is 500 (libxslt’s default).
|
|
Packit |
e4b6da |
</para></listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><option>--profile</option></term>
|
|
Packit |
e4b6da |
<term><option>-P</option></term>
|
|
Packit |
e4b6da |
<listitem><para>
|
|
Packit |
e4b6da |
Display profile information: the total number of calls to each template
|
|
Packit |
e4b6da |
in the stylesheet and the time taken for each. This information is
|
|
Packit |
e4b6da |
output to standard error.
|
|
Packit |
e4b6da |
</para></listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><option>--xslt-processor <replaceable>processor</replaceable></option></term>
|
|
Packit |
e4b6da |
<term><option>-X <replaceable>processor</replaceable></option></term>
|
|
Packit |
e4b6da |
<listitem><para>
|
|
Packit |
e4b6da |
Select the underlying XSLT processor used. The possible choices for
|
|
Packit |
e4b6da |
<replaceable>processor</replaceable> are: <simplelist type="inline">
|
|
Packit |
e4b6da |
<member><literal>libxslt</literal></member>
|
|
Packit |
e4b6da |
<member><literal>saxon</literal></member>
|
|
Packit |
e4b6da |
<member><literal>xalan-j</literal></member></simplelist>.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
The default processor is whatever was set when docbook2X was built.
|
|
Packit |
e4b6da |
libxslt is recommended (because it is lean and fast),
|
|
Packit |
e4b6da |
but SAXON is much more robust and would be more helpful when
|
|
Packit |
e4b6da |
debugging stylesheets.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
All the processors have XML catalogs support enabled.
|
|
Packit |
e4b6da |
(docbook2X requires it.)
|
|
Packit |
e4b6da |
But note that not all the options above work with processors
|
|
Packit |
e4b6da |
other than the libxslt one.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
</listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
</variablelist>
|
|
Packit |
e4b6da |
</refsect2>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</refsect1>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect1>
|
|
Packit |
e4b6da |
<title>Environment</title>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<variablelist>
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><envar>XML_CATALOG_FILES</envar></term>
|
|
Packit |
e4b6da |
<listitem><para>Specify XML Catalogs.
|
|
Packit |
e4b6da |
If not specified, the standard catalog
|
|
Packit |
e4b6da |
(<filename>/etc/xml/catalog</filename>) is loaded, if available.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
</listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<varlistentry>
|
|
Packit |
e4b6da |
<term><envar>DB2X_XSLT_PROCESSOR</envar></term>
|
|
Packit |
e4b6da |
<listitem><para>Specify the XSLT processor to use.
|
|
Packit |
e4b6da |
The effect is the same as the <option>--xslt-processor</option>
|
|
Packit |
e4b6da |
option. The primary use of this variable is to allow you to quickly
|
|
Packit |
e4b6da |
test different XSLT processors without having to add
|
|
Packit |
e4b6da |
<option>--xslt-processor</option> to every script or make file in
|
|
Packit |
e4b6da |
your documentation build system.
|
|
Packit |
e4b6da |
</para></listitem>
|
|
Packit |
e4b6da |
</varlistentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</variablelist>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</refsect1>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect1>
|
|
Packit |
e4b6da |
<title>Conforming to</title>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
<ulink url="http://www.w3.org/TR/xslt">XML Stylesheet Language – Transformations (XSLT), version
|
|
Packit |
e4b6da |
1.0</ulink>, a W3C Recommendation.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
</refsect1>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect1>
|
|
Packit |
e4b6da |
<title>Notes</title>
|
|
Packit |
e4b6da |
<indexterm><primary>XSLT extensions</primary></indexterm>
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
In its earlier versions (< 0.8.4),
|
|
Packit |
e4b6da |
docbook2X required XSLT extensions to run, and
|
|
Packit |
e4b6da |
&db2x_xsltproc; was a special libxslt-based processor that had these
|
|
Packit |
e4b6da |
extensions compiled-in. When the requirement for XSLT extensions
|
|
Packit |
e4b6da |
was dropped, &db2x_xsltproc; became a Perl script which translates
|
|
Packit |
e4b6da |
the options to &db2x_xsltproc; to conform to the format accepted by
|
|
Packit |
e4b6da |
the stock &xsltproc_cmd; which comes with libxslt.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>The prime reason for the existence of this script
|
|
Packit |
e4b6da |
is backward compatibility with any scripts
|
|
Packit |
e4b6da |
or make files that invoke docbook2X. However,
|
|
Packit |
e4b6da |
it also became easy to add in support for invoking
|
|
Packit |
e4b6da |
other XSLT processors with a unified command-line interface.
|
|
Packit |
e4b6da |
Indeed, there is nothing special in this script to docbook2X,
|
|
Packit |
e4b6da |
or even to DocBook, and it may be used for running other sorts of
|
|
Packit |
e4b6da |
stylesheets if you desire. Certainly the author prefers using this
|
|
Packit |
e4b6da |
command, because its invocation format is sane and is easy to
|
|
Packit |
e4b6da |
use. (e.g. no typing long class names for the Java-based processors!)
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
</refsect1>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
&man-page-author-section;
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect1>
|
|
Packit |
e4b6da |
<title>See Also</title>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
&man-page-see-also;
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
You may wish to consult the documentation that comes
|
|
Packit |
e4b6da |
with libxslt, SAXON, or Xalan. The W3C XSLT 1.0 specification
|
|
Packit |
e4b6da |
would be useful for writing stylesheets.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</refsect1>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</refentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refentry id="sgml2xml-isoent">
|
|
Packit |
e4b6da |
<indexterm><primary>SGML</primary></indexterm>
|
|
Packit |
e4b6da |
<indexterm><primary>ISO entities</primary></indexterm>
|
|
Packit |
e4b6da |
<indexterm><primary>&sgml2xml-isoent;</primary></indexterm>
|
|
Packit |
e4b6da |
<indexterm><primary>DocBook</primary></indexterm>
|
|
Packit |
e4b6da |
<refmeta>
|
|
Packit |
e4b6da |
<refentrytitle id="sgml2xml-isoent_name">&sgml2xml-isoent;</refentrytitle>
|
|
Packit |
e4b6da |
<manvolnum>1</manvolnum>
|
|
Packit |
e4b6da |
</refmeta>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refnamediv>
|
|
Packit |
e4b6da |
<refname>&sgml2xml-isoent;</refname>
|
|
Packit |
e4b6da |
<refpurpose>Convert SGML to XML with support for ISO
|
|
Packit |
e4b6da |
entities</refpurpose>
|
|
Packit |
e4b6da |
</refnamediv>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsynopsisdiv>
|
|
Packit |
e4b6da |
<cmdsynopsis>
|
|
Packit |
e4b6da |
<command>sgml2xml-isoent</command>
|
|
Packit |
e4b6da |
<arg><replaceable>sgml-document</replaceable></arg>
|
|
Packit |
e4b6da |
</cmdsynopsis>
|
|
Packit |
e4b6da |
</refsynopsisdiv>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect1>
|
|
Packit |
e4b6da |
<title>Description</title>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
&sgml2xml-isoent; converts an SGML document to XML,
|
|
Packit |
e4b6da |
with support for the ISO entities.
|
|
Packit |
e4b6da |
This is done by using &sgml2xml; from the
|
|
Packit |
e4b6da |
SP package (or &osx; from the OpenSP package),
|
|
Packit |
e4b6da |
and the declaration for the XML version of the ISO entities
|
|
Packit |
e4b6da |
is added to the output.
|
|
Packit |
e4b6da |
This means that the output of this conversion
|
|
Packit |
e4b6da |
should work as-is with any XML tool.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
This program is often used for processing SGML DocBook documents
|
|
Packit |
e4b6da |
with XML-based tools. In particular, &db2x_xsltproc_ref;
|
|
Packit |
e4b6da |
calls this program as part of its <option>--sgml</option>
|
|
Packit |
e4b6da |
option. On the other hand, it is probably not helpful for
|
|
Packit |
e4b6da |
migrating a source SGML text file to XML, since the conversion
|
|
Packit |
e4b6da |
mangles the original formatting.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
Since the XML version of the ISO entities
|
|
Packit |
e4b6da |
are referred to directly, not via a DTD, this tool
|
|
Packit |
e4b6da |
also works with document types other than DocBook.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</refsect1>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect1>
|
|
Packit |
e4b6da |
<title>Notes</title>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
The ISO entities are referred using the public identifiers
|
|
Packit |
e4b6da |
<literal>ISO 8879:1986//ENTITIES//<replaceable>…</replaceable>//EN//XML</literal>.
|
|
Packit |
e4b6da |
The catalogs used when parsing the converted document should
|
|
Packit |
e4b6da |
resolve these entities to the appropriate place (on the local
|
|
Packit |
e4b6da |
filesystem). If the entities are not resolved in the catalog,
|
|
Packit |
e4b6da |
then the fallback is to get the entity files
|
|
Packit |
e4b6da |
from the <literal>http://www.docbook.org/</literal> Web site.
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</refsect1>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
&man-page-author-section;
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<refsect1>
|
|
Packit |
e4b6da |
<title>See Also</title>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
<para>
|
|
Packit |
e4b6da |
<simplelist type="inline">
|
|
Packit |
e4b6da |
<member>&sgml2xml;</member>
|
|
Packit |
e4b6da |
<member>&osx;</member>
|
|
Packit |
e4b6da |
</simplelist>
|
|
Packit |
e4b6da |
</para>
|
|
Packit |
e4b6da |
</refsect1>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</refentry>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
</sect1>
|
|
Packit |
e4b6da |
|