Blame doc/db2x_xsltproc.html

Packit e4b6da
Packit e4b6da
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Packit e4b6da
<html xmlns="http://www.w3.org/1999/xhtml">
Packit e4b6da
<head>
Packit e4b6da
Packit e4b6da
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
Packit e4b6da
Packit e4b6da
"text/html; charset=us-ascii" />
Packit e4b6da
<title>docbook2X: db2x_xsltproc</title>
Packit e4b6da
<link rel="stylesheet" href="docbook2X.css" type="text/css" />
Packit e4b6da
<link rev="made" href="mailto:stevecheng@users.sourceforge.net" />
Packit e4b6da
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1" />
Packit e4b6da
Packit e4b6da
"docbook2X: Documentation Table of Contents" />
Packit e4b6da
Packit e4b6da
"docbook2X: The XSLT stylesheets" />
Packit e4b6da
Packit e4b6da
"docbook2X: The XSLT stylesheets" />
Packit e4b6da
Packit e4b6da
"docbook2X: sgml2xml-isoent" />
Packit e4b6da
</head>
Packit e4b6da
<body>
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
"command">db2x_xsltproc
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
"xsltproc.html"><< Previous 
Packit e4b6da
The XSLT stylesheets
Packit e4b6da
 
Packit e4b6da
"sgml2xml-isoent.html">Next >>
Packit e4b6da
Packit e4b6da
Packit e4b6da

Packit e4b6da
Packit e4b6da
name="db2x_xsltproc">
Packit e4b6da
Packit e4b6da
Packit e4b6da
"id2535849" class="indexterm" name="id2535849">
Packit e4b6da
"id2535856" class="indexterm" name="id2535856">
Packit e4b6da
Packit e4b6da

Name

Packit e4b6da

db2x_xsltproc

Packit e4b6da
— XSLT processor invocation wrapper

Packit e4b6da
Packit e4b6da
Packit e4b6da

Synopsis

Packit e4b6da
Packit e4b6da

db2x_xsltproc [

Packit e4b6da
"replaceable">options] 
Packit e4b6da
"replaceable">xml-document

Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
name="id2535929">
Packit e4b6da

Description

Packit e4b6da

db2x_xsltproc

Packit e4b6da
invokes the XSLT 1.0 processor for docbook2X.

Packit e4b6da

This command applies the XSLT stylesheet (usually given by the

Packit e4b6da
--stylesheet option) to the XML
Packit e4b6da
document in the file 
Packit e4b6da
"replaceable">xml-document. The result is written
Packit e4b6da
to standard output (unless changed with 
Packit e4b6da
"option">--output).

Packit e4b6da

To read the source XML document from standard input, specify

Packit e4b6da
- as the input document.

Packit e4b6da
Packit e4b6da
Packit e4b6da
name="id2535973">
Packit e4b6da

Options

Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
"option">--version
Packit e4b6da
Packit e4b6da

Display the docbook2X version.

Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
name="id2535995">
Packit e4b6da

Transformation output options

Packit e4b6da
Packit e4b6da
Packit e4b6da
--output
Packit e4b6da
"replaceable">file, 
Packit e4b6da
"term">-o 
Packit e4b6da
"replaceable">file
Packit e4b6da
Packit e4b6da

Write output to the given file (or URI), instead of standard

Packit e4b6da
output.

Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
name="id2536028">
Packit e4b6da

Source document options

Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
"option">--xinclude, 
Packit e4b6da
"option">-I
Packit e4b6da
Packit e4b6da

Process XInclude directives in the source document.

Packit e4b6da
Packit e4b6da
--sgml,
Packit e4b6da
-S
Packit e4b6da
Packit e4b6da

Indicate that the input document is SGML instead of XML. You

Packit e4b6da
need this set this option if 
Packit e4b6da
"replaceable">xml-document is actually a SGML
Packit e4b6da
file.

Packit e4b6da

SGML parsing is implemented by conversion to XML via

Packit e4b6da
Packit e4b6da
"refentrytitle">
Packit e4b6da
"command">sgml2xml from the SP
Packit e4b6da
package (or 
Packit e4b6da
"refentrytitle">
Packit e4b6da
"command">osx from the OpenSP
Packit e4b6da
package). All tag names in the SGML file will be normalized to
Packit e4b6da
lowercase (i.e. the -xlower option of
Packit e4b6da
Packit e4b6da
"refentrytitle">
Packit e4b6da
"command">sgml2xml is used). ID
Packit e4b6da
attributes are available for the stylesheet (i.e. option
Packit e4b6da
-xid). In addition, any ISO SDATA
Packit e4b6da
entities used in the SGML document are automatically converted to
Packit e4b6da
their XML Unicode equivalents. (This is done by a
Packit e4b6da
sed filter.)

Packit e4b6da

The encoding of the SGML document, if it is not

Packit e4b6da
"literal">us-ascii, must be specified with the standard SP
Packit e4b6da
environment variables: 
Packit e4b6da
"userinput">SP_CHARSET_FIXED=1 SP_ENCODING=
Packit e4b6da
"replaceable">encoding. (Note
Packit e4b6da
that XML files specify their encoding with the XML declaration
Packit e4b6da
<?xml version="1.0"
Packit e4b6da
encoding="encoding"
Packit e4b6da
?> at the top of the file.)

Packit e4b6da

The above conversion options cannot be changed. If you desire

Packit e4b6da
different conversion options, you should invoke 
Packit e4b6da
"citerefentry">
Packit e4b6da
"command">sgml2xml manually, and then
Packit e4b6da
pass the results of that conversion to this program.

Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
name="id2536204">
Packit e4b6da

Retrieval options

Packit e4b6da
Packit e4b6da
Packit e4b6da
--catalogs
Packit e4b6da
"replaceable">catalog-files,
Packit e4b6da
-C 
Packit e4b6da
"replaceable">catalog-files
Packit e4b6da
Packit e4b6da

Specify additional XML catalogs to use for resolving Formal

Packit e4b6da
Public Identifiers or URIs. SGML catalogs are not supported.

Packit e4b6da

These catalogs are not

Packit e4b6da
used for parsing an SGML document under the 
Packit e4b6da
"option">--sgml option. Use the environment variable
Packit e4b6da
SGML_CATALOG_FILES instead to specify
Packit e4b6da
the catalogs for parsing the SGML document.

Packit e4b6da
Packit e4b6da
Packit e4b6da
"option">--network, 
Packit e4b6da
"option">-N
Packit e4b6da
Packit e4b6da

db2x_xsltproc will

Packit e4b6da
normally refuse to load external resources from the network, for
Packit e4b6da
security reasons. If you do want to load from the network, set this
Packit e4b6da
option.

Packit e4b6da

Usually you want to have installed locally the relevent DTDs and

Packit e4b6da
other files, and set up catalogs for them, rather than load them
Packit e4b6da
automatically from the network.

Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
name="id2536294">
Packit e4b6da

Stylesheet options

Packit e4b6da
Packit e4b6da
Packit e4b6da
--stylesheet
Packit e4b6da
"replaceable">file, 
Packit e4b6da
"term">-s 
Packit e4b6da
"replaceable">file
Packit e4b6da
Packit e4b6da

Specify the filename (or URI) of the stylesheet to use. The

Packit e4b6da
special values man and 
Packit e4b6da
"literal">texi are accepted as abbreviations, to specify
Packit e4b6da
that xml-document is in
Packit e4b6da
DocBook and should be converted to man pages or Texinfo
Packit e4b6da
(respectively).

Packit e4b6da
Packit e4b6da
--param
Packit e4b6da
"replaceable">name=
Packit e4b6da
"replaceable">expr, 
Packit e4b6da
"term">-p 
Packit e4b6da
"replaceable">name=
Packit e4b6da
"replaceable">expr
Packit e4b6da
Packit e4b6da

Add or modify a parameter to the stylesheet.

Packit e4b6da
"replaceable">name is a XSLT parameter name, and
Packit e4b6da
expr is an XPath
Packit e4b6da
expression that evaluates to the desired value for the parameter.
Packit e4b6da
(This means that strings must be quoted, 
Packit e4b6da
"emphasis">in addition to the usual quoting of
Packit e4b6da
shell arguments; use --string-param to
Packit e4b6da
avoid this.)

Packit e4b6da
Packit e4b6da
--string-param
Packit e4b6da
name=
Packit e4b6da
"replaceable">string, 
Packit e4b6da
"term">-g 
Packit e4b6da
"replaceable">name=
Packit e4b6da
"replaceable">string
Packit e4b6da
Packit e4b6da

Add or modify a string-valued parameter to the stylesheet.

Packit e4b6da

The string must be encoded in UTF-8 (regardless of the locale

Packit e4b6da
character encoding).

Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
name="id2536426">
Packit e4b6da

Debugging and profiling

Packit e4b6da
Packit e4b6da
Packit e4b6da
--debug,
Packit e4b6da
-d
Packit e4b6da
Packit e4b6da

Display, to standard error, logs of what is happening during the

Packit e4b6da
XSL transformation.

Packit e4b6da
Packit e4b6da
--nesting-limit
Packit e4b6da
n,
Packit e4b6da
-D 
Packit e4b6da
"replaceable">n
Packit e4b6da
Packit e4b6da

Change the maximum number of nested calls to XSL templates, used

Packit e4b6da
to detect potential infinite loops. If not specified, the limit is
Packit e4b6da
500 (libxslt’s default).

Packit e4b6da
Packit e4b6da
Packit e4b6da
"option">--profile, 
Packit e4b6da
"option">-P
Packit e4b6da
Packit e4b6da

Display profile information: the total number of calls to each

Packit e4b6da
template in the stylesheet and the time taken for each. This
Packit e4b6da
information is output to standard error.

Packit e4b6da
Packit e4b6da
--xslt-processor
Packit e4b6da
processor,
Packit e4b6da
-X 
Packit e4b6da
"replaceable">processor
Packit e4b6da
Packit e4b6da

Select the underlying XSLT processor used. The possible choices

Packit e4b6da
for processor are:
Packit e4b6da
libxslt,
Packit e4b6da
saxon, 
Packit e4b6da
"literal">xalan-j.

Packit e4b6da

The default processor is whatever was set when docbook2X was

Packit e4b6da
built. libxslt is recommended (because it is lean and fast), but
Packit e4b6da
SAXON is much more robust and would be more helpful when debugging
Packit e4b6da
stylesheets.

Packit e4b6da

All the processors have XML catalogs support enabled. (docbook2X

Packit e4b6da
requires it.) But note that not all the options above work with
Packit e4b6da
processors other than the libxslt one.

Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
name="id2536567">
Packit e4b6da

Environment

Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
"envar">XML_CATALOG_FILES
Packit e4b6da
Packit e4b6da

Specify XML Catalogs. If not specified, the standard catalog

Packit e4b6da
(/etc/xml/catalog) is loaded, if
Packit e4b6da
available.

Packit e4b6da
Packit e4b6da
Packit e4b6da
"envar">DB2X_XSLT_PROCESSOR
Packit e4b6da
Packit e4b6da

Specify the XSLT processor to use. The effect is the same as the

Packit e4b6da
--xslt-processor option. The primary
Packit e4b6da
use of this variable is to allow you to quickly test different XSLT
Packit e4b6da
processors without having to add 
Packit e4b6da
"option">--xslt-processor to every script or make file in
Packit e4b6da
your documentation build system.

Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
name="id2536622">
Packit e4b6da

Conforming to

Packit e4b6da

XML Stylesheet

Packit e4b6da
Language – Transformations (XSLT), version 1.0, a W3C
Packit e4b6da
Recommendation.

Packit e4b6da
Packit e4b6da
Packit e4b6da
name="id2536640">
Packit e4b6da

Notes

Packit e4b6da
Packit e4b6da

In its earlier versions (< 0.8.4), docbook2X required XSLT

Packit e4b6da
extensions to run, and 
Packit e4b6da
"command">db2x_xsltproc was a special libxslt-based
Packit e4b6da
processor that had these extensions compiled-in. When the
Packit e4b6da
requirement for XSLT extensions was dropped, 
Packit e4b6da
"command">db2x_xsltproc became a Perl script which
Packit e4b6da
translates the options to 
Packit e4b6da
"command">db2x_xsltproc to conform to the format
Packit e4b6da
accepted by the stock 
Packit e4b6da
"refentrytitle">
Packit e4b6da
"command">xsltproc which comes with
Packit e4b6da
libxslt.

Packit e4b6da

The prime reason for the existence of this script is backward

Packit e4b6da
compatibility with any scripts or make files that invoke docbook2X.
Packit e4b6da
However, it also became easy to add in support for invoking other
Packit e4b6da
XSLT processors with a unified command-line interface. Indeed,
Packit e4b6da
there is nothing special in this script to docbook2X, or even to
Packit e4b6da
DocBook, and it may be used for running other sorts of stylesheets
Packit e4b6da
if you desire. Certainly the author prefers using this command,
Packit e4b6da
because its invocation format is sane and is easy to use. (e.g. no
Packit e4b6da
typing long class names for the Java-based processors!)

Packit e4b6da
Packit e4b6da
Packit e4b6da
name="id2536724">
Packit e4b6da

See Also

Packit e4b6da

You may wish to consult the documentation that comes with

Packit e4b6da
libxslt, SAXON, or Xalan. The W3C XSLT 1.0 specification would be
Packit e4b6da
useful for writing stylesheets.

Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da

Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da
"xsltproc.html"><< Previous 
Packit e4b6da
Packit e4b6da
"xsltproc.html">Up
Packit e4b6da
 
Packit e4b6da
"sgml2xml-isoent.html">Next >>
Packit e4b6da
Packit e4b6da
Packit e4b6da
The XSLT
Packit e4b6da
stylesheets 
Packit e4b6da
Packit e4b6da
"docbook2X.html">Table of Contents
Packit e4b6da
Packit e4b6da
 
Packit e4b6da
"command">sgml2xml-isoent
Packit e4b6da
Packit e4b6da
Packit e4b6da
Packit e4b6da

Packit e4b6da
"http://docbook2x.sourceforge.net/" title=
Packit e4b6da
"docbook2X: Home page">docbook2X home page

Packit e4b6da
</body>
Packit e4b6da
</html>