DOCBOOK XSLTPROC PDF

xsltproc and libxslt are not specifically dependant on DocBook, but since a lot of people use xsltproc and libxml2 for DocBook formatting, here are a few pointers. The docbook-html5 project is a set of XSLT stylesheets for transforming DocBook 5 Examples given here use xsltproc, an open source cross-platform XSLT. Reason: missing introduction (Discuss in Talk:DocBook#) xsltproc /usr/share/ xml/docbook/$(pacman -Q docbook-xsl | cut -d ‘ ‘ -f 2 | cut -d ‘-‘ -f.

Author: Tojat Zolorr
Country: Guyana
Language: English (Spanish)
Genre: Medical
Published (Last): 7 October 2006
Pages: 392
PDF File Size: 20.90 Mb
ePub File Size: 8.16 Mb
ISBN: 823-7-15400-822-9
Downloads: 17805
Price: Free* [*Free Regsitration Required]
Uploader: JoJor

This section describes how to install the free processors.

DocBook XSL: The Complete Guide

The commercial processors are assumed to provide instructions and support. You should check the details with each product that is described here, as the steps may change over time. The installation of xsltproc is platform dependent since it is a compiled C program. You will need a C compiler and associated Make tools unless you are using Windows. Macintosh users can download binaries from http: You can download precompiled versions for Windows from Igor Zlatkovic’s website: That page also describes how to install the files and use xsltproc on Windows.

You need to download the packages for libxmllibxsltzliband iconv. Once you have unpacked them, your environment’s PATH variable must include the locations of the command files like xsltproc.

Since they install into separate directories, you may need to add several PATH entries. So it is perhaps simplest to just copy all the files into a single location already in the PATH. For example, find and copy thefollowing files into C: You will know it is working if you can execute the following command in a Command shell to list the version information:. Cygwin is a Linux-like environment that runs on Windows. It gives you the same command shells and utilities that are available on Linux systems.

If you are comfortable with Linux, then you can have it on Windows too. There is a version of xsltproc for Cygwin. You will see information for installing Cygwin over the Internet.

The complete Cygwin collection of packages is big, so it might take a long time over a slow connection. You can select only the packages you need. Read the directions for understanding the GUI interface used by the Cygwin setup. The two packages you must have are libxml2 and libxsltboth available under the Libs category. You should also install one of the shells such as bash.

Once you have installed the packages, you should be able to start a Cygwin shell and execute this command to see the version installed:. If you are running a recent vintage 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:. If that command fails, or if it reports an old version, you can install the files you need using the RPM packages. You need system administration privileges root to install packages.

  FOS CONSUMER LEAFLET PDF

Then commands such as these should work:. Then try xsltproc -version to see if it reports the new version number. If you cannot find a precompiled version of xsltproc xslyproc 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. It is even available for Cygwin a Linux environment that runs on Windows. You might need to search the Internet to find one for your system if it does not already have one.

Once you have gcc set up, download and unpack the latest xsltproc source archives from http: To run the xsltproc processor, you need the libxml2 and libxslt packages, the ones docboook the highest version numbers.

The XSLT C library for GNOME

Then do the following:. You will need to have root permission to run the install step. If these steps proceed without error, you should be able to run this command to test it:. 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. To use xsltproc, you specify the location of the main stylesheet file and your DocBook document, as well as any options and parameters:.

You can place any options such as –output after xsltproc. The options are listed at http: You can use any number of –stringparam options to pass stylesheet parameter values on the command line, in this case setting the parameter named use.

If a parameter value includes spaces or special characters, put it in quotes. If you do not like using a command line interface, you can download the free tkxsltproc from http: It is a graphical interface to xsltproc that lets you browse for filenames and set options and parameters.

Processing profiled versions

Currently Saxon is available in four packages:. It runs on any Java-capable system, and provides opportunities for adding extensions. It is probably the most commonly used Saxon package, and is xsltprlc version used in the examples in this book. The Instant Saxon processor is a precompiled version of Saxon 6.

It is under active development, as are several of the standards that it implements. This is the commercial version of Saxon 8. That optional step is included here too. So your system must have a Java processing environment for it to work. You can find out which Java is on your system by executing java -version.

If you get Command not found then you may not have Java installed on the system, or it may not be in your PATH environment variable. Java version numbering has evolved over the years. The following table lists past and current Java versions:. The Java runtime system is available for download from Sun Microsystems, Inc. If you have a different platform UNIX or Mac, for instancethen you need to contact your OS vendor to see if they make available an up-to-date Java runtime environment.

  ASTERIX AND OBELIX MEET CLEOPATRA PDF

To download Saxon, go to http: Saxon is distributed as a zip file, so you need to unzip it into some suitable location. It can be a temporary location because you can move the few files you really need to a new location. To run Saxon, you only need to tell your Java processor where the Saxon. There are three files in the directory you unpacked Saxon into:. You will not need saxon-fop. The DocBook stylesheets have some custom extension functions written specifically for the Saxon processor.

These functions are contained in a saxon There may be several saxon jar files there, labeled by the version number of Saxon. Use the one closest to your Saxon version number. You want the Xerces2 Java parser. The web page has a link to where you can download just the latest jar file, xercesImpl. Put the file in a convenient location. You need to include the full path to the necessary. That environment variable is used by the Java processor to locate compiled code used by Java programs.

You can copy the.

If it does not already exist in the list, then select New. Each path should be a full path to one of the required. If you are already in a DOS window, you will need to exit and restart it for the new environment variable to take effect. This should report the version of Saxon that you have installed, as well as usage and command options.

Saxon is a Java application that is executed from a command line.

In order for the command to find all the Java code it needs, you must add the Java. Once xsltprov have done that, then you execute the java command as follows. The backslashes mean the line continues without break, but is shown here on separate lines sxltproc clarity.

Note that the XML document name precedes the stylesheet path in a Saxon command line. You can put any Saxon options such as -o before the document filename. The possible options are listed at http: You can also set any number of stylesheet parameters such as use. The section on installing Saxon included an optional step for downloading the Xerces parser. Once you have added the path to xercesImpl. These -D options must appear before the com.

The xaltproc will fail if the xercesImpl.

The DocBook Saxon and Xalan extensions are not enabled by default. They are enabled by setting various stylesheet parameters.

Each extension has its own stylesheet parameter, and they are all set to 1 on by default. However, they are not actually turned on by default because the overall use.