1SAXON(1)                                                              SAXON(1)
2
3
4

NAME

6       saxon - command line XSLT 2.0 processor
7

SYNOPSIS

9       saxon [OPTION...] [-s:SOURCEFILE] [-xsl:STYLESHEET] [-o:OUTPUT]
10                   [NAME=VALUE...]
11

DESCRIPTION

13       This manual page documents briefly the saxon command. This page was
14       written for the Debian(TM) distribution because the original program
15       does not have a manual page. Instead, it has HTML documentation which
16       is shipped in the "saxon-manual" package.
17
18       saxon is a command line wrapper around the Saxon-B XSLT and XQuery
19       processor. Using saxon you can process XML documents with XSLT 2.0
20       stylesheets directly from the command line. Internally, saxon is a
21       wrapper around the Java class net.sf.saxon.Transform implemented by
22       Saxon-B.
23
24       saxon is usually invoked passing the 3 options made explicit in the
25       above synopsis. Usually, those options correspond respectively to the
26       input XML file to be transformed, the XSLT stylesheet describing the
27       desired transformation, and the output file where to save the result.
28       However, the meaning and the need of passing them is affected by a
29       number of other options that can be specified. See the option reference
30       below for more information.
31
32   Parameters
33       At the end of the command line, a list of parameters can be given.
34       Parameters are passed using the syntax NAME=VALUE, to specify
35       parameters´ names and values.
36
37       A parameter name prefixed with "+" (plus sign) will be interpreted as a
38       filesystem path parameter If the path points to a single file, that
39       file will be parsed as XML and its document node will be passed as the
40       parameter value. If the path points to a directory, all directly
41       contained files will be parsed as XML files, and the sequence of their
42       document nodes will be passed as the parameter value.
43
44       A parameter name prefixed with "!" (exclamation mark) will be interpted
45       as a output/serialization parameter. See the specifications of XQuery
46       and XSLT 2.0 for more information on output/serialization parameters.
47
48       To pass parameters belonging to the non-null namespace, the syntax
49       {uri}localname=value is provided.
50
51       Parameters will be visible as global variables during XSLT processing,
52       provided they have been declared with <xsl:param>. evaluation, provided
53       they have been declared in the query prolog. See the XSLT specification
54       for more information on variables and their declarations.
55

OPTIONS

57       A summary of supported options is included below. Options can be passed
58       in any order.
59
60       We first report the options which are shared by saxon and saxonq, then
61       those specific to saxon (or which have a different semantics).
62
63       Some options are flagged as "Saxon-SA only", such options work only if
64       Saxon-SA is installed. Note that Saxon-SA is a commercial product, as
65       such it is not available in Debian.
66
67   Common options
68       -cr:classname
69           Specify a class to be used for processing collection URIs passed to
70           the collection() function. The class must implement
71           net.sf.saxon.CollectionURIResolver.
72
73       -dtd: {[on] | [off]}
74           Enable or disable DTD validation. Default: off.
75
76       -expand: {[on] | [off]}
77           When validation is enabled, expand default values in validated
78           documents. This option enables or disables such an expansion.
79           Default: on.
80
81       -explain [:filename]
82           Display an execution plan; the output is in XML format. If filename
83           is not given it will be displayed on standard output.
84
85       -ext: {[on] | [off]}
86           Enable or disable the ability to invoke external Java functions
87           from query files and stylesheets. Beware that enabling them is a
88           potential security risk when processing untrusted files. Default:
89           off.
90
91       -l: {[on] | [off]}
92           Keep (when on) or throw away (when off) line numbers in tress
93           corresponding to source documents. When kept, line numbers can be
94           accessed using the function saxon:line-number(). Default: off.
95
96       -outval: {[recover] | [fatal]}
97           When validation is required, set whether validation errors are
98           fatal (when "fatal" is passed) or if they only trigger warnings
99           (when "recover" is). Default: fatal.
100
101       -p: {[on] | [off]}
102           Enable or disable usage of the PTreeURIResolver. Saxon-SA only.
103
104       -r:classname
105           Specify a class to be used for resolving all URIs.
106
107       -repeat:N
108           Repeat the transformation N times. For benchmarking purposes.
109
110       -sa
111           Perform Schema-aware processing. Saxon-SA only.
112
113       -strip: {[all] | [none] | [ignorable]}
114           Specify whitespace stripping policy for source documents: strip all
115           of them ("all"), strip none of them ("none"), strip ignorable
116           whitespace only ("ignorable"). Default: none.
117
118       -t
119           Display version, timing, and other debugging information on
120           standard error.
121
122       -tree: {[tiny] | [linked]}
123           Select the implementation of the internal tree model: tiny tree
124           model ("tiny") or linked tree model ("linked"). See the Saxon
125           documentation for more information on the internal tree model.
126           Default: tiny.
127
128       -T [:classname]
129           Trace various aspect of the processing; an optional class name can
130           be given to specify a user-chosen tracer. The class must implement
131           net.sf.saxon.trace.TraceListener. The default is a system supplied
132           tracer. This option implies -l.
133
134       -TJ
135           Enable tracing of external Java method invocation. See -ext.
136
137       -u
138           Force interpretation of source document names as URI. By default
139           they are considered to be file names, unless they start with
140           "file:" or "http:".
141
142       -val: {[strict] | [lax]}
143           When validation is enabled, choose among "strict" or "lax"
144           validation. Saxon-SA only.
145
146       -x:classname
147           Specify a class to be used as SAX parser for input documents. The
148           class must implement either org.xml.sax.Parser or
149           org.xml.sax.XMLReader.
150
151       -xi
152           Apply XInclude processing to all input documents.
153
154       -xmlversion: {[1.0] | [1.1]}
155           Choose the XML version for processing input documents. "1.1" must
156           be specified to process XML 1.1 and Namespaces 1.1 constructs.
157           Default: 1.0.
158
159       -?
160           Display a help message and exit.
161
162   Options specific to saxon
163       -a
164           Use the "<?xml-stylesheet ... ?>" processing instruction from the
165           source document to find the stylesheet to be used. This option is
166           not compatible with -xsl.
167
168       -c:filename
169           Use the compiled stylesheet stored in filename. This option is not
170           compatible with -xsl.
171
172       -im:modename
173           Use modename as the initial mode used for the transformation.
174           Qualified modes can be specified as "{uri}localname".
175
176       -it:templatename
177           Use templatename as the initial named template for the
178           transformation. When this option is used, -xsl is optional.
179
180       -m:classname
181           Specify a class to be used as the receiver for messages generated
182           by <xsl:message>. The class must implement
183           net.sf.saxon.event.Receiver.
184
185       -o:path
186           Specify the path to be used for saving generated output. Usually
187           path points to a filename where the main result document will be
188           saved. If not specified such a document will be written to standard
189           output.
190
191           Additional output documents generated using the
192           <xsl:result-document> command uses path as the basename for the
193           "href" attribute of the command. If -o is missing they will be
194           saved relatively to the current working directory.
195
196           When -s identifies a directory, also -o should identify one. All
197           the output documents will then be written under such a directory.
198
199       -or:classname
200           Specify a class to be used as the output resolver for the "href"
201           attribute of <xsl:result-document>. The class must implement
202           net.sf.saxon.OutputURIResolver.
203
204       -s:path
205           Specify the input file or directory. This option is required unless
206           -it has been given. If path points to a filename, that file will be
207           parsed as an XML document and its document node will be the context
208           item at the beginning of the transformation. The special filename
209           "-" can be used to require reading the input document from standard
210           input.
211
212           If path points to a directory all files directly contained in it
213           will be individually transformed. In such a case -o is required.
214           -u affects the intepretation of path.
215
216       -versmsg: {[on] | [off]}
217           Enable or disable the warning about using an XSLT 2.0 processor
218           (which Saxon-B is) on stylesheets which specify version="1.0" in
219           their root element. Default: on.
220
221       -warnings: {[silent] | [recover] | [fatal]}
222           Set the policy for handling recoverable errors: "silent" for silent
223           recovery, "recover" for recovery with warning output on standard
224           error, "fatal" for no recovery. Default: recover.
225
226       -xsl:filename
227           Specify the main XSLT stylesheet to be used for the transformation.
228           This option is required unless -a or -c are specified. The special
229           filename "-" can be used to require reading the sylesheet from
230           standard input.  -u affects the intepretation of filename.
231
232       -y:filename
233           Specify a class to be used as SAX parser for stylesheets. The class
234           must implement either org.xml.sax.Parser or org.xml.sax.XMLReader.
235           See also -x.
236

SEE ALSO

238       saxonq (1), XSL Transformations (XSLT) Version 2.0 (W3C
239       Recommendation).
240
241       This program is fully documented by the HTML documentation of Saxon,
242       available in the "saxon-manual" package.
243

AUTHOR

245       This manual page was written by Stefano Zacchiroli <zack@debian.org>
246       for the Debian(TM) system (but may be used by others). Permission is
247       granted to copy, distribute and/or modify this document under the terms
248       of the GNU General Public License, Version 3 or any later version
249       published by the Free Software Foundation.
250
251       On Debian systems, the complete text of the GNU General Public License
252       can be found in /usr/share/common-licenses/GPL.
253
255       Copyright © 2008 Stefano Zacchiroli
256
257
258
259                                 February 2008                        SAXON(1)
Impressum