http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Overview

Downloads
Getting Started

FAQs

Sample Apps
Command Line
Usage Patterns

C++ API

Extensions

Release Notes

Bug reporting

Downloading what you need
 

For Xalan-C++ version 1.0, we are distributing a Windows32 Visual C++ build, a Red Hat Linux GNU build, and an AIX xlC_r build. Please contact us at Xalan Development Mailing List if you would like to help provide builds for other platforms.

Xalan-C++ Distributions
 


For the Windows32 build, download Xalan-C_1_0-win32.zip.

For the Linux build, download Xalan-C_1_0-linux.tar.gz

For the AIX build, download Xalan-C_1_0-aix.tar.gz

Each distribution contains all you need to run the Xalan command-line utility for performing transformations. To build your own applications, you also need a compatible Xerces-C++ binary distribution. If you want to take advantage of the support for number formatting, sorting, and encoding the ICU provides, you should also download and install the International Components for Unicode (ICU); see Using the ICU,

What you need to run the Xalan command-line utility
 

To run the Xalan executable for performing transformations, you need the following:

Windows32

  • The executable: TestXSLT.exe
  • The Xalan-C++ dynamic link libraries: DOMSupport.dll, PlatformSupport.dll, XalanDOM.dll, XercesParserLiaison.dll, XMLSupport.dll, XPath.dll, XSLT.dll
  • The Xerces-C++ dynamic link library: xerces-c_1_3.dll

Linux

  • The executable: TestXSLT
  • The Xalan-C++ shared library: libxalan-c1_0.so
  • The Xerces-C++ shared library: libxerces-c1_3.so

AIX

  • The executable: TestXSLT
  • The Xalan-C++ load library: libxalan-c1_0.a
  • The Xerces-C++ load library: libxerces-c1_3.a

If you want to enable ICU support for the command-line utility, you must build the ICU and rebuild the Xalan-C++ shared/load library (Linux/AIX) and TestXSLT (all platforms) with the ICUBridge. See Using the ICU and Enabling ICU support for TestXSLT.

For information about using the command-line utility, see Command-Line Utility.

NoteIf you want to do your own AIX build, you must download STLport and set the STLPORTROOT environment variable to the complete path to the STLPort distribution (see the Build notes)

What you need to build applications
 

To build your own applications with Xalan and Xerces, you also need need the Xalan-C++ and Xerces-C++ header (.hpp) files and (for Windows) the Xalan-C++ and Xerces-C++ libraries (.lib files).

The Xalan-C++ header files are in the src directory tree in both distributions.

In the Windows32 distribution (built with Microsoft® Visual C++® 6.0), the dlls and libraries are in the Build - Win32 -V6 - Release subdirectory.

In the Linux distribution (built with a make file and the GNU C++ compiler on Red Hat Linux 6.1), the shared object library is in the lib subdirectory.

In the AIX distribution (built with the make file and xlC_r), the load library is in the lib subdirectory.

To get the Xerces-C++ header and (for Windows) .lib files, download and expand the Xerces-C++ binary distribution for your platform from the Xerces-C++ distribution directory. For information about which Xerces-C++ distribution has been tested with this Xalan-C++ release, see Version of Xerces-C++ to use.

If you want to enable ICU support in your applications, you must rebuild the Xalan-C++ shared/load library (Linux/AIX) and include the ICUBridge headers (all platforms).

For the requirements for rebuilding Xalan-C++, see the Build notes.



Setting up the path
 

For the Xalan-C++ Windows32 distribution, place xml-xalan\c\Build\Win32\VC6\Release on the path.

For the Xalan-C++ Linux distribution, place xml-xalan/c/bin and xml-xalan/c/lib on the shared library path (LD_LIBRARY_PATH for Red Hat Linux 6.1), or copy libxalan-c1_0.so to /usr/lib.

For the Xalan-C++ AIX distribution, place xml-xalan/c/bin and xml-xalan/c/lib on the load library path (LIB_PATH for AIX), or copy libxalan-c1_0.a to /usr/lib.

If you do your own Xalan, ICU, and Xerces builds, be sure to include the directories that contain the libraries and the TextXSLT executable on your path.


Trying out the samples
 

The Xalan-C++ distribution includes a number of basic sample applications. We have precompiled these samples for you so they are ready to run, and you can review the source files to see just how they work.

To run the samples, do the following:

  1. Set up your path (see above). In the Windows32 distribution, the sample executables are in xml-xalan\c\Build\Win32\VC6\Release. In the Linux and AIX distributions, the executables are in xml-xalan/c/bin.
  2. Go to the samples subdirectory containing the sample.
  3. Run the sample from the command line (in Windows, use the DOS shell).
  4. Examine the application source files.

For example, go to the SimpleTransform subdirectory and issue the following command:

SimpleTransform

SimpleTransform uses the foo.xsl stylesheet to transform foo.xml, and writes the transformation result to foo.out. To see how the example works, examine the source files: foo.xml, foo.xsl, foo.out, and SimpleTransform.cpp.

For more information about the samples, see Xalan-C++ Samples.


Performing your own transformations from the command line
 

TestXSLT provides a basic utility for performing transformations from the command line. The command line for most standard transformations is as follows:

TestXSLT -in xmlSource -xsl stylesheet -out outputfile

where xmlSource is the XML source file name, stylesheet is the XSL stylesheet file name, and outputfile is the output file name.

If you want the output to be displayed on the screen, simply omit the -out flag and outputfile.

You can use this utility to try out XSL stylesheets you have written, to make sure they do what you expect with the XML source files they are designed to transform. The utility provides useful messages if the source file or stylesheet is not well formed. If you include a DOCTYPE statement in your XML source files and include the -validate flag on the command line, the utility will also let you know whether the XML document is valid (conforms to that DOCTYPE). For more information, see Command-Line Utility.


Setting up your own XSLT applications
 

You can start by using your own XML source files and XSL stylesheets with the sample applications, which illustrate a number of usage patterns. For more information on setting up applications, see Basic Usage Patterns.



Copyright © 2000 The Apache Software Foundation. All Rights Reserved.