1db2x_xsltproc(1) docbook2X db2x_xsltproc(1)
2
3
4
6 db2x_xsltproc - XSLT processor invocation wrapper
7
9 db2x_xsltproc [options] xml-document
10
12 db2x_xsltproc invokes the XSLT 1.0 processor for docbook2X.
13
14 This command applies the XSLT stylesheet (usually given by the
15 --stylesheet option) to the XML document in the file xml-document. The
16 result is written to standard output (unless changed with --output).
17
18 To read the source XML document from standard input, specify - as the
19 input document.
20
22 --version
23 Display the docbook2X version.
24
25 TRANSFORMATION OUTPUT OPTIONS
26 --output file, -o file
27 Write output to the given file (or URI), instead of standard
28 output.
29
30 SOURCE DOCUMENT OPTIONS
31 --xinclude, -I
32 Process XInclude directives in the source document.
33
34 --sgml, -S
35 Indicate that the input document is SGML instead of XML. You
36 need this set this option if xml-document is actually a SGML
37 file.
38
39 SGML parsing is implemented by conversion to XML via sgml2xml(1)
40 from the SP package (or osx(1) from the OpenSP package). All tag
41 names in the SGML file will be normalized to lowercase (i.e. the
42 -xlower option of sgml2xml(1) is used). ID attributes are avail‐
43 able for the stylesheet (i.e. option -xid). In addition, any ISO
44 SDATA entities used in the SGML document are automatically con‐
45 verted to their XML Unicode equivalents. (This is done by a sed
46 filter.)
47
48 The encoding of the SGML document, if it is not us-ascii, must
49 be specified with the standard SP environment variables:
50 SP_CHARSET_FIXED=1 SP_ENCODING=encoding. (Note that XML files
51 specify their encoding with the XML declaration <?xml ver‐
52 sion="1.0" encoding="encoding" ?> at the top of the file.)
53
54 The above conversion options cannot be changed. If you desire
55 different conversion options, you should invoke sgml2xml(1) man‐
56 ually, and then pass the results of that conversion to this pro‐
57 gram.
58
59 RETRIEVAL OPTIONS
60 --catalogs catalog-files, -C catalog-files
61 Specify additional XML catalogs to use for resolving Formal Pub‐
62 lic Identifiers or URIs. SGML catalogs are not supported.
63
64 These catalogs are not used for parsing an SGML document under
65 the --sgml option. Use the environment variable SGML_CATA‐
66 LOG_FILES instead to specify the catalogs for parsing the SGML
67 document.
68
69 --network, -N
70 db2x_xsltproc will normally refuse to load external resources
71 from the network, for security reasons. If you do want to load
72 from the network, set this option.
73
74 Usually you want to have installed locally the relevent DTDs and
75 other files, and set up catalogs for them, rather than load them
76 automatically from the network.
77
78 STYLESHEET OPTIONS
79 --stylesheet file, -s file
80 Specify the filename (or URI) of the stylesheet to use. The
81 special values man and texi are accepted as abbreviations, to
82 specify that xml-document is in DocBook and should be converted
83 to man pages or Texinfo (respectively).
84
85 --param name=expr, -p name=expr
86 Add or modify a parameter to the stylesheet. name is a XSLT pa‐
87 rameter name, and expr is an XPath expression that evaluates to
88 the desired value for the parameter. (This means that strings
89 must be quoted, in addition to the usual quoting of shell argu‐
90 ments; use --string-param to avoid this.)
91
92 --string-param name=string, -g name=string
93 Add or modify a string-valued parameter to the stylesheet.
94
95 The string must be encoded in UTF-8 (regardless of the locale
96 character encoding).
97
98 DEBUGGING AND PROFILING
99 --debug, -d
100 Display, to standard error, logs of what is happening during the
101 XSL transformation.
102
103 --nesting-limit n, -D n
104 Change the maximum number of nested calls to XSL templates, used
105 to detect potential infinite loops. If not specified, the limit
106 is 500 (libxslt’s default).
107
108 --profile, -P
109 Display profile information: the total number of calls to each
110 template in the stylesheet and the time taken for each. This in‐
111 formation is output to standard error.
112
113 --xslt-processor processor, -X processor
114 Select the underlying XSLT processor used. The possible choices
115 for processor are: libxslt, saxon, xalan-j.
116
117 The default processor is whatever was set when docbook2X was
118 built. libxslt is recommended (because it is lean and fast),
119 but SAXON is much more robust and would be more helpful when de‐
120 bugging stylesheets.
121
122 All the processors have XML catalogs support enabled. (doc‐
123 book2X requires it.) But note that not all the options above
124 work with processors other than the libxslt one.
125
127 XML_CATALOG_FILES
128 Specify XML Catalogs. If not specified, the standard catalog
129 (/etc/xml/catalog) is loaded, if available.
130
131 DB2X_XSLT_PROCESSOR
132 Specify the XSLT processor to use. The effect is the same as
133 the --xslt-processor option. The primary use of this variable is
134 to allow you to quickly test different XSLT processors without
135 having to add --xslt-processor to every script or make file in
136 your documentation build system.
137
139 XML Stylesheet Language – Transformations (XSLT), version 1.0 ⟨http://
140 www.w3.org/TR/xslt⟩ , a W3C Recommendation.
141
143 In its earlier versions (< 0.8.4), docbook2X required XSLT extensions
144 to run, and db2x_xsltproc was a special libxslt-based processor that
145 had these extensions compiled-in. When the requirement for XSLT exten‐
146 sions was dropped, db2x_xsltproc became a Perl script which translates
147 the options to db2x_xsltproc to conform to the format accepted by the
148 stock xsltproc(1) which comes with libxslt.
149
150 The prime reason for the existence of this script is backward compati‐
151 bility with any scripts or make files that invoke docbook2X. However,
152 it also became easy to add in support for invoking other XSLT proces‐
153 sors with a unified command-line interface. Indeed, there is nothing
154 special in this script to docbook2X, or even to DocBook, and it may be
155 used for running other sorts of stylesheets if you desire. Certainly
156 the author prefers using this command, because its invocation format is
157 sane and is easy to use. (e.g. no typing long class names for the Java-
158 based processors!)
159
161 Steve Cheng <stevecheng@users.sourceforge.net>.
162
164 The docbook2X manual (in Texinfo or HTML format) fully describes how to
165 convert DocBook to man pages and Texinfo.
166
167 Up-to-date information about this program can be found at the docbook2X
168 Web site ⟨http://docbook2x.sourceforge.net/⟩ .
169
170 You may wish to consult the documentation that comes with libxslt, SAX‐
171 ON, or Xalan. The W3C XSLT 1.0 specification would be useful for writ‐
172 ing stylesheets.
173
174
175
176docbook2X 0.8.7 18 April 2006 db2x_xsltproc(1)