1SAXON(1)                         User Commands                        SAXON(1)
2
3
4

NAME

6       saxon - Process XML documents with XSLT stylesheets
7

SYNOPSIS

9       saxon [options] source-doc [style-doc] [{param=value}...]
10

DESCRIPTION

12       saxon is a command line tool for applying XSLT stylesheets to XML docu‐
13       ments.
14
15       It is invoked from the command line with some options, followed by  the
16       name of the source document to be transformed, followed by the the name
17       of the stylesheet to use for the transformation, and  finally  followed
18       by optional XSL parameters.
19
20       A  parameter  takes  the  form  name=value,  name being the name of the
21       parameter, and value the value of the parameter.  These parameters  are
22       accessible  within  the stylesheet as normal variables, using the $name
23       syntax, provided they are declared using a top-level xsl:param element.
24       If  there  is  no  such  declaration,  the  supplied parameter value is
25       silently ignored.  You can specify a parameter value containing  spaces
26       by enclosing it in double quotes, for example name="John Brown".
27

OPTIONS

29       -a     Use the xml-stylesheet processing instruction in the source doc‐
30              ument to identify the stylesheet to be used.   When  using  this
31              option,  the  style-doc  argument should be omitted.  The <?xml-
32              stylesheet?> processing instruction must have a pseudo-attribute
33              href  that  identifies  the  relative  or  absolute  URL  of the
34              stylesheet document, and a pseudo-attribute type whose value  is
35              "text/xml", "application/xml", or "text/xsl".  For example:
36
37                <?xml-stylesheet type="text/xsl" href="../style3.xsl"?>
38
39              Stylesheets  embedded  within  the  source document are not sup‐
40              ported in this release.
41
42       -dmodel
43              Selects the implementation of  the  internal  tree  model.   -dt
44              selects  the "tinytree" model.  -ds selects the traditional tree
45              model.  The default is -dt.
46
47       -l     Switches line numbering on for the source document.   Line  num‐
48              bers  are  accessible through the extension function saxon:line-
49              number(), or from a trace listener.
50
51       -m classname
52              Use the specified Emitter to process the  output  from  xsl:mes‐
53              sage.  The class must implement the com.icl.saxon.output.Emitter
54              class.  This interface is similar to a  SAX  ContentHandler,  it
55              takes  a  stream  of  events to generate output.  In general the
56              content of a message is an XML fragment.  By default  the  stan‐
57              dard  XML  emitter  is used, configured to write to the standard
58              error stream, and to include no XML declaration.   Each  message
59              is output as a new document.
60
61       -noext Suppress  calls  on  extension functions, other than system-sup‐
62              plied Saxon and EXSLT extension functions.  This option is  use‐
63              ful  when loading an untrusted stylesheet, perhaps from a remote
64              site using an HTTP URL; it ensures that  the  stylesheet  cannot
65              call   Java  methods  and  thereby  gain  privileged  access  to
66              resources on your machine.
67
68       -o filename
69              Send output to named file.  In the absence of this option,  out‐
70              put  goes  to standard output.  The file extension of the output
71              file is used to decide the default  output  method  if  none  is
72              specified.
73
74       -r classname
75              Use  the  specified URIResolver to process all URIs.  The URIRe‐
76              solver   is   a   user-defined   class,   that    extends    the
77              com.icl.saxon.URIResolver class, whose function is to take a URI
78              supplied as a string, and  return  a  SAX  InputSource.   It  is
79              invoked  to process URIs used in the document() function, in the
80              xsl:include and xsl:import elements, and (if -u is  also  speci‐
81              fied) to process the URIs of the source file and stylesheet file
82              provided on  the  command  line.    If  xml-commons-resolver  is
83              available,  defaults to org.apache.xml.resolver.tools.CatalogRe‐
84              solver.
85
86       -t     Display version and timing information  to  the  standard  error
87              output.
88
89       -T     Display  stylesheet  tracing  information  to the standard error
90              output.  Also switches line numbering on for  the  source  docu‐
91              ment.
92
93       -TL classname
94              Run  the  stylesheet  using  the  specified  TraceListener.  The
95              classname names  a  user-defined  class,  which  must  implement
96              com.icl.saxon.trace.TraceListener.
97
98       -u     Indicates  that  the  names of the source document and the style
99              document are URLs; otherwise they are taken as filenames, unless
100              they start with "http:" or "file:", in which case they are taken
101              as URLs.
102
103       -wlevel
104              Indicates the policy for  handling  recoverable  errors  in  the
105              stylesheet:  -w0 means recover silently, -w1 means recover after
106              writing a warning message to the system error output, -w2  means
107              signal  the error and do not attempt recovery.  (Note, this does
108              not currently apply to all errors that the  XSLT  recommendation
109              describes as recoverable).  The default is -w1.
110
111       -x classname
112              Use  the  specified SAX parser for source file and for any files
113              loaded using the document() function.  The parser  must  be  the
114              fully-qualified  class  name of a Java class that implements the
115              org.xml.sax.Parser or org.xml.sax.XMLReader interface.  If  xml-
116              commons-resolver       is       available,      defaults      to
117              org.apache.xml.resolver.tools.ResolvingXMLReader.
118
119       -y classname
120              Use the specified SAX parser for all stylesheet files, including
121              any  loaded using xsl:include or xsl:import.  The parser must be
122              the fully-qualified class name of a Java class  that  implements
123              the  org.xml.sax.Parser  or org.xml.sax.XMLReader interface.  If
124              xml-commons-resolver     is     available,      defaults      to
125              org.apache.xml.resolver.tools.ResolvingXMLReader.
126
127       -?     Display command syntax.
128

FILES

130       /etc/java/resolver/CatalogManager.properties
131              The central catalog manager configuration file used by saxon for
132              resolving XML  entities  and  URIs  if  xml-commons-resolver  is
133              available.
134

SEE ALSO

136       xsltproc(1)
137

AUTHOR

139       Michael H. Kay <mike@saxonica.com>
140
141
142
1436.5.5                              July 2004                          SAXON(1)
Impressum