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 0.40.0, we are distributing a Windows32 Visual C++ build and a Linux build. In the future, we intend to add builds for other platforms.

Xalan-C++ Distributions
 


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

For the Linux build, download Xalan-C_0_40_0-linux.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++ distribution and (NOT FOR THIS RELEASE)the International Components for Unicode(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, XercesPlatformSupport.dll, XMLSupport.dll, XPath.dll, XSLT.dll
  • The Xerces-C++ dynamic link library: xerces-c_1_2.dll
  • (NOT FOR THIS RELEASE) The International Components for Unicode (ICU) dynamic link libraries: icui18n.dll, icuuc.dll
  • (NOT FOR THIS RELEASE) The ICU locale data files

Linux

  • The utility: TestXSLT
  • The Xalan-C++ shared library: libxalan-c0_40.so
  • The Xerces-C++ shared library: libxerces-c1_2.so
  • (NOT FOR THIS RELEASE) The International Components for Unicode (ICU) shared library: libicu-1_4_1_2.so
  • (NOT FOR THIS RELEASE) The ICU locale data files

(NOT FOR THIS RELEASE and we will place the locale data files where they can be found) ICU requires you to set the ICU_DATA environment variable to point to the directory containing the ICU locale data files. In the Windows32 distribution, this is xml-xalan\c\Build\Win32\VC6\Release\Data. In the Linux distribution, it is xml-xalan/c/lib/data.

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


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 Red Hat Linux 6.1), the shared object 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.

For information about 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-c0_40.so 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. These samples are easy to compile and run, and you can review the source files -- all of which are brief -- to see just how they work. In the Windows32 distribution, we have precompiled these samples for you so they are ready to run. In the Linux distribution, you need to build them first.

To run the samples, do the following:

  1. (Linux only) Set up make files and compile the sample sources (you may need to make some minor changes in the header files to accommodate Linux) and build an executable for each sample application.
  2. Set up your path (see above). In the Windows32 distribution, the sample executables are in xml-xalan\c\Build\Win32\VC6\Release. For Linux, we suggest you build the executables in xml-xalan/c/bin.
  3. Go to the samples subdirectory containing the sample (use the DOS shell in Windows).
  4. Run the sample from the command line.
  5. 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.