SAXON(1) User Commands SAXON(1)NAMEsaxon - Process XML documents with XSLT stylesheets
SYNOPSISsaxon [options] source-doc [style-doc] [{param=value}...]
DESCRIPTIONsaxon is a command line tool for applying XSLT stylesheets to XML docu‐
ments.
It is invoked from the command line with some options, followed by the
name of the source document to be transformed, followed by the the name
of the stylesheet to use for the transformation, and finally followed
by optional XSL parameters.
A parameter takes the form name=value, name being the name of the
parameter, and value the value of the parameter. These parameters are
accessible within the stylesheet as normal variables, using the $name
syntax, provided they are declared using a top-level xsl:param element.
If there is no such declaration, the supplied parameter value is
silently ignored. You can specify a parameter value containing spaces
by enclosing it in double quotes, for example name="John Brown".
OPTIONS-a Use the xml-stylesheet processing instruction in the source doc‐
ument to identify the stylesheet to be used. When using this
option, the style-doc argument should be omitted. The <?xml-
stylesheet?> processing instruction must have a pseudo-attribute
href that identifies the relative or absolute URL of the
stylesheet document, and a pseudo-attribute type whose value is
"text/xml", "application/xml", or "text/xsl". For example:
<?xml-stylesheet type="text/xsl" href="../style3.xsl"?>
Stylesheets embedded within the source document are not sup‐
ported in this release.
-dmodel
Selects the implementation of the internal tree model. -dt
selects the "tinytree" model. -ds selects the traditional tree
model. The default is -dt.
-l Switches line numbering on for the source document. Line num‐
bers are accessible through the extension function saxon:line-
number(), or from a trace listener.
-m classname
Use the specified Emitter to process the output from xsl:mes‐
sage. The class must implement the com.icl.saxon.output.Emitter
class. This interface is similar to a SAX ContentHandler, it
takes a stream of events to generate output. In general the
content of a message is an XML fragment. By default the stan‐
dard XML emitter is used, configured to write to the standard
error stream, and to include no XML declaration. Each message
is output as a new document.
-noext Suppress calls on extension functions, other than system-sup‐
plied Saxon and EXSLT extension functions. This option is use‐
ful when loading an untrusted stylesheet, perhaps from a remote
site using an HTTP URL; it ensures that the stylesheet cannot
call Java methods and thereby gain privileged access to
resources on your machine.
-o filename
Send output to named file. In the absence of this option, out‐
put goes to standard output. The file extension of the output
file is used to decide the default output method if none is
specified.
-r classname
Use the specified URIResolver to process all URIs. The URIRe‐
solver is a user-defined class, that extends the
com.icl.saxon.URIResolver class, whose function is to take a URI
supplied as a string, and return a SAX InputSource. It is
invoked to process URIs used in the document() function, in the
xsl:include and xsl:import elements, and (if -u is also speci‐
fied) to process the URIs of the source file and stylesheet file
provided on the command line. If xml-commons-resolver is
available, defaults to org.apache.xml.resolver.tools.CatalogRe‐
solver.
-t Display version and timing information to the standard error
output.
-T Display stylesheet tracing information to the standard error
output. Also switches line numbering on for the source docu‐
ment.
-TL classname
Run the stylesheet using the specified TraceListener. The
classname names a user-defined class, which must implement
com.icl.saxon.trace.TraceListener.
-u Indicates that the names of the source document and the style
document are URLs; otherwise they are taken as filenames, unless
they start with "http:" or "file:", in which case they are taken
as URLs.
-wlevel
Indicates the policy for handling recoverable errors in the
stylesheet: -w0 means recover silently, -w1 means recover after
writing a warning message to the system error output, -w2 means
signal the error and do not attempt recovery. (Note, this does
not currently apply to all errors that the XSLT recommendation
describes as recoverable). The default is -w1.
-x classname
Use the specified SAX parser for source file and for any files
loaded using the document() function. The parser must be the
fully-qualified class name of a Java class that implements the
org.xml.sax.Parser or org.xml.sax.XMLReader interface. If xml-
commons-resolver is available, defaults to
org.apache.xml.resolver.tools.ResolvingXMLReader.
-y classname
Use the specified SAX parser for all stylesheet files, including
any loaded using xsl:include or xsl:import. The parser must be
the fully-qualified class name of a Java class that implements
the org.xml.sax.Parser or org.xml.sax.XMLReader interface. If
xml-commons-resolver is available, defaults to
org.apache.xml.resolver.tools.ResolvingXMLReader.
-? Display command syntax.
FILES
/etc/java/resolver/CatalogManager.properties
The central catalog manager configuration file used by saxon for
resolving XML entities and URIs if xml-commons-resolver is
available.
SEE ALSOxsltproc(1)AUTHOR
Michael H. Kay <mike@saxonica.com>
6.5.5 July 2004 SAXON(1)