Appendix C
Command-Line Reference for Selected Processors

In this book, you have learned about several processors. These processors have been used with only their most basic options. This reference shows you all the options for the different processors and tells you the effect of each option.

The processors discussed are

• MSXSL

• Saxon

• Xalan

If you want to use another processor, check out http://xsl.startkabel.nl/, which contains links to most known processors.

MSXSL

Microsoft has a parser/processor component named MSXML, which works on any version of Windows 95 or higher, or Windows NT 4.0 or higher. Several versions are in circulation, so for proper XSLT support, you need to make sure that your system contains MSXML 3.0 or higher. Installing Internet Explorer 6.0 or higher will do the trick. Otherwise, you can download the latest version from http://msdn.microsoft.com/xml.

You can’t run the component itself from the command line; only developers creating applications with Visual Basic, Visual C++, ASP, and so on can use it. MSXSL is a utility that lets you use the MSXML parser/processor component from the command line. This utility needs to be downloaded and installed separately. MSXSL can also be downloaded from http://msdn.microsoft.com/xml.

Usage

When you invoke MSXSL from the command line, be sure that you type MSXSL, the name of the utility, and not MSXML, the name of the component. You can run MSXSL from the command line as follows:

MSXSL source stylesheet[options][param=value...] [xmlns:prefix=uri...]

Any number of param=value pairs can be added to the command line, to pass parameters to the stylesheet.

The parameters may use a namespace prefix that is not defined in the stylesheet. To resolve this problem, you can add any number of namespace prefixes with their URIs. This is also valid for a start mode with a namespace prefix (see Table C.1).

Table C.1 Options for MSXSL

Image

Options

Table C.1 shows a list of command-line options for MSXSL, along with their meaning.

Saxon

Saxon is a processor developed by Michael Kay, one of the leading XSLT experts. Although it is not a corporate product, it is one of the best processors around, specifically where standards compliance is concerned. You can download the latest version of Saxon from http://users.iclway.co.uk/mhkay/saxon/.

There are two versions of Saxon. Full Saxon is the full product with all documentation, source code, Java executables, and samples. Windows users can also use Instant Saxon, which is a Windows executable that can be run from the command line.

Usage

You can use Instant Saxon as follows:

SAXON [options] source stylesheet[param=value...]

Full Saxon runs under Java, so you need to invoke Java with the correct class name, as follows:

java com.icl.saxon.StyleSheet [options] source stylesheet[param=value...]

Any number of param=value pairs can be added to the command line, to pass parameters to the stylesheet.

Options

Table C.2 shows a list of command-line options for Saxon, along with their meaning.

Table C.2 Options for Saxon

Image

Xalan

Xalan, a popular processor, was developed by the Apache XML Project (http://xml.apache.org/). Two versions of Xalan are available. Xalan C++ is the first version that was implemented in C++. The current version is Xalan Java 2, which is an entirely new implementation in Java. In this book, I used Xalan to indicate Xalan Java 2.

Usage

When you run Xalan, remember that it runs under Java, so you need to invoke Java with the correct class name, as follows:

java org.apache.xalan.xslt.Process -IN source -XSL stylesheet [options]

You can add any number of parameters on the command line to be used in the stylesheet. Unlike in the other processors, you have to specify each parameter as an option (see Table C.3).

Table C.3 Options for Xalan

Image

Options

Table C.3 shows a list of command-line options for Xalan, along with their meaning.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.101.81