Using a command-line utility Using the Xalan executable
| Using a command-line utility |
| To perform a transformation, you can call Xalan-C++ from the command line (or script), or from within an application (see Usage Patterns). To perform a transformation from the command line or a script, do the following: Download Xalan-C++. Set the path/library path to include the Xalan executable and the Xalan and Xerces libraries. Call the Xalan executable with the appropriate flags and arguments (described below).
| Using the Xalan executable |
| Call the Xalan executable as follows: `Xalan [options] xmlSource xslStylesheet` where xmlSource is the XML source document, xslStylesheet is the stylesheet to apply, and [options] are any (or none) of the following:
Option | Description
-a | Use stylesheet processing instruction, not the stylesheet argument.
-e encoding | Force the specified encoding for the output.
-i integer | Indent the specified amount.
-m | Omit the META tag in HTML output.
-o filename | Write transformation result to this file (rather than to the console).
-p name expr | Set a stylesheet parameter with this expression.
-t name expr | Display timing information.
-u name expr | Disable escaping of URLs in HTML output.
-v | Validate the XML source document.
- | A dash as the 'source' argument reads from stdin. A dash as the 'stylesheet' argument reads from stdin. ('-' cannot be used for both arguments.)
To display a list of the options call the Xalan executable as follows: `Xalan -?`

Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.