Command line interfaces

The net.sf.saxon.Transform command line now allows "-" as either the source file name or the stylesheet file name, with the meaning that the source file or stylesheet is read from standard input. Note that this means it will have no system ID, and therefore no base URI, so relative URLs contained within the document cannot be resolved. Thanks to Gunther Schadow [gunther@aurora.regenstrief.org] for this enhancement.

It is now possible to specify output parameters on the command line. These are entered in the same way as stylesheet parameters, but with a "!" as the first character of the name. For example, !indent=yes switches indentation on, and !{http://saxon.sf.net/}indent-spaces=1 sets the indentation level to one. A value specified on the command line overrides any value specified in an xsl:output declaration in the stylesheet.

A new TraceListener is available, called TimedTraceListener. This can be activated using the -TP flag on the command line. A stylesheet is available for analysing the resulting execution trace. For details, see Performance Analysis.

The command line option -im modename can be used to specify the initial mode in which the transformation starts. The modename may use the "{uri}local-name" syntax if it is namespace-qualified. An initial mode can also be selected using the setInitialMode() method on the Controller.