Chapter 4. System Requirements

Table of Contents

Online Edition
Standalone Edition
SVG Viewers
XSLT processors
Installing an XSLT processor
Installing xsltproc
Installing Saxon
Installing Xalan

Online Edition

Although the Online Edition of uml2svg requires no installation on your computer, there are two things you will need to ensure before you can use it properly: a fast internet connection and a SVG-enabled web browser. If your web browser does not support SVG (and many browsers don't) you will have to install a specific plug-in (see the section called “SVG Viewers”).

Standalone Edition

uml2svg is operating system independent. It has been used successfully on UNIX, Mac and Windows, and it will work just the same on any other operating system. The first prerequisite for using the Standalone Edition of uml2svg is an XSLT processor. Some modern web-browsers offer some limited support for XSLT transformations, usually via JavaScript. This support is not sufficient to run uml2svg. You need a real XSLT processor (see the section called “XSLT processors”).

The second prerequisite is a viewer for the SVG files that result from the conversion (see the section called “SVG Viewers”).

SVG Viewers

Here are three SVG Viewers that come for free:

Name: Adobe SVG Viewer
Comment: Browser plugin for Internet Explorer and Netscape Navigator. (Freeware)
Name: Apache Batik Squiggle
Comment: SVG-only browser, part of the Batik toolkit. (Open Source, Apache Lincese)
Name: Firefox
Comment: Starting with version 1.5 Mozilla added SVG support for their browser (Open Source, Mozilla License)

XSLT processors

Many good XSLT processors are freely available. You will need one when using the Standalone Edition of uml2svg. the section called “Installing an XSLT processor” explains in detail how to install three of them.

Name: Apache Xalan-C++
Comment: based on Apache Xerces-C++ for parsing
Name: Apache Xalan-Java
Comment: very popular Java XSLT processor that comes together with the recent Java SDKs
Comment: not really free software, but comes as a bonus with Windows XP or later
Name: Sablotron
Comment: based on expat for parsing
Name: Saxon
Comment: one of the best XSLT processors
Name: xsltproc
Comment: based on libxslt (so indirectly on libxml2 for parsing)

Installing an XSLT processor

This section describes how to install three of the free processors on Windows and Linux. The instructions provided here are informational only and the only definitive source of information on the projects is the official websites and documentation. You should check those sources as the steps presented here may change over time.

Installing xsltproc

The installation of xsltproc is platform dependent since it is a compiled C program.

Installing xsltproc on Windows

You can download precompiled versions for Windows from Igor Zlatkovic's website. The website also describes how to install the files and use xsltproc on Windows. You need to download at least the following packages:

  • libxml2, the XML parser and processor.

  • libxslt, the XSL and EXSL Transformations processor.

  • iconv, the character encoding toolkit.

  • zlib, the compression toolkit.

Once you have unpacked the .zip files, the PATH variable must include the locations of the xsltproc.exe file and the following dynamic load libraries: libxslt.dll, libxml2.dll, libexslt.dll, iconv.dll and zlib1.dll. Since they install into separate directories, it is perhaps simplest to just copy the files into a standard location. For example, find and copy all the files into C:\Windows\System32.

You will know it is working if you can execute the following command to list the version information:

xsltproc -version

Installing xsltproc on Linux

If you are running a recent version of Linux, there is a good chance you will already have xsltproc installed on your system. Try the following command to see if you do:

xsltproc -version

If the command fails, you can install the files you need using the RPM packages: libxml2 and libxslt

Just run the following commands while logged in as root (don't forget to substitute the file names with the ones you actually downloaded):

rpm -Uv libxml2-2.6.16-5.i386.rpm

rpm -Uv libxslt-1.1.12-3.i386.rpm

Type xsltproc -version once more to see if the installation worked.

Compiling xsltproc

If you cannot find a precompiled version of xsltproc for your platform, or if you want the very latest version, then you can compile it yourself from source. It is pretty easy to compile xslproc if you use the GNU compiler. That compiler is generally available on all Linux distributions, and is also available for many UNIX systems. You might need to search the Internet to find one for your system if it doesn't already have one.

Once you have gcc set up, download and unpack the latest xsltproc source archives from To run the xsltproc processor, you need to download the libxml2 and libxslt packages. Then do the following:

  1. Unpack the tar.gz archives:

    tar zxvf libxml2-2.6.16.tar.gz

    tar zxvf libxslt-1.1.9.tar.gz

  2. Compile libxml2:

    cd libxml2-2.6.16



    make install

    cd ..

  3. Compile libxslt:

    cd libxslt-1.0.18



    make install

You will need to have root permission to run the make install step. If these steps proceed without error, you should be able to run this command to test it:

xsltproc -version

If you get a Command Not Found error message, then you need to find where xsltproc is installed and add that location to your PATH environment variable.

Installing Saxon

Saxon comes in two packages: Saxon-B (“basic”) and Saxon-SA (“schema-aware”). The main difference between Saxon-SA and Saxon-B is that Saxon-SA supports XML Schema validation. Only Saxon-B is an open source product so you will probably chose Saxon-B. To use uml2svg you don’t need any of the more advanced features of Saxon-SA so we will describe only the installation of Saxon-B.

Installing a JavaVM

Saxon is a Java-based XSLT processor so your system must have a Java Development Kit (JDK) installed. Saxon 8.2 will run with JDK 1.4 and JDK 1.5. It is likely that future Saxon releases will require JDK 1.5, so we advise you to use this version. You can find out which Java version is installed on your system by executing java -version. If you get an error or an earlier version number you will need to install a JDK, which is available for download from Sun Microsystems. The installation process is fully automated, but if you run into trouble you can consult the Installation Instructions

If you choose to install JDK 1.4 (or you have it already installed on your system) and want to use Saxon, you will have to additionally install JAXP 1.3. You can download it from This download includes two JAR files: jaxp-api.jar and dom.jar, which must be added to the class path (also see the section called “Updating the Class Path”).

Downloading Saxon

Saxon-B can be downloaded from the SourceForge page as a single .zip file.


Installation of Saxon simply involves unzipping the supplied download file into a suitable directory. For this purpose you can use the Jar archiver that comes with Java:

cd /usr/saxon

jar xf

Updating the Class Path

One of the files that will be created in this directory is saxon8.jar. When running Saxon, this principal JAR file should be on the class path. The class path is normally represented by an environment variable named CLASSPATH: see the Java documentation for details. Note that the JAR file itself (not the directory that contains it) should be listed on the class path.

To update your CLASSPATH on Linux, put these lines in your .profile file (replacing the directory with the one you used to extract the Saxon-B .zip file):



On Windows, use the Control Panel to open the System icon, where you can set environment variables for Windows. Use semicolons instead of colons to separate CLASSPATH items on Windows. Once again you are encouraged the see the Java documentation for details.

Installing Xalan

Starting with JDK 1.4 Xalan is bundled with Java. If you are running Java 1.4.0 or newer, you do not need to install Xalan at all. If you are using an older version of Java, you will need to install Xalan yourself. Even if you have a current Java version, you may want to install a newer version of Xalan than the one that is bundled with it. You can find out which Java version is installed on your system by executing java -version.

Installing a JavaVM

Since Xalan is a java program you must have a Java Runtime Environment (JRE) or Java Development Environment (JRE) installed. Xalan 2.6.0 requires JDK/JRE 1.2.2 or later to run, however we advise you to install the latest JDK. (see the section called “Installing a JavaVM” part of the section called “Installing Saxon”)

Downloading Xalan

To download Xalan-J, go to and locate the latest stable binary version for download. As of version 2.6.0, Xalan is available in two binary distributions, one that includes the Xalan Compiled processor (XSLTC) in xalan.jar, and in the other, it does not. Either one will work fine for running uml2svg. The descriptions below are valid no matter which one you decided to use.

Be sure to get Xalan Java (Xalan-J), not the Xalan C++.


Xalan-J is packaged as a .zip file which can be unpacked using the Java jar command:

cd /usr

jar xf

This command will create a sub-directory called xalan-j_2_6_0 in the /usr directory containing the Xalan distribution.

Endorsing the .jar files.

If you have Java version 1.4.0 or later, you already have a working Xalan. But if you want to install a newer version, you need to put the files xalan.jar, xml-apis.jar and xercesImpl.jar in the lib/endorsed directory in your Java directory. Then the new Xalan will be used in place of the built-in Xalan. If you don't register the newer Xalan as the endorsed version, then your processing will use the older version of Xalan and you may not get the results you expected.

Alternatively you could specify an option to force the use of the the newer versions: -Djava.endorsed.dirs=/usr/xalan-j_2_6_0/bin every time you start the java virtual machine. You should replace /usr/xalan-j_2_6_0 with the directory that contains the Xalan's .jar files.

More information about the endorsing mechanism is provided by the Java documentation.

If your Java version is earlier than 1.4.0, you can put the .jar files in any convenient location for creating a CLASSPATH (directory names don't contain spaces). You don't have to worry about the endorsing process, unless you upgrade your Java at a later date to 1.4 or higher.

Updating the Class Path

If your Java version is earlier than 1.4.0 you need to include the full path to the .jar files in your CLASSPATH environment variable (see the Java documentation for details). To update your CLASSPATH on Linux, put these lines in your .profile file:

CLASSPATH=$CLASSPATH:/usr/xalan-j_2_6_0/xalan.jar:/usr/xalan-j_2_6_0/xml-apis.jar: /usr/xalan-j_2_6_0/xercesImpl.jar


On Windows, use the Control Panel to open the System icon, where you can set environment variables for Windows. Use semicolons instead of colons to separate items in the CLASSPATH. Once again you are encouraged the see the Java documentation for details.