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.
|Published (Last):||27 August 2009|
|PDF File Size:||7.65 Mb|
|ePub File Size:||17.77 Mb|
|Price:||Free* [*Free Regsitration Required]|
These functions are contained in a file named xalan Setting up the tools Chapter 1. To run Xalan, you only need to tell your Java processor where the Xalan. Since they install into separate directories, you may need to add several PATH entries. There may be several saxon xslttproc files there, labeled by the version number of Saxon.
If that command fails, or if it reports an dochook version, you can install the files you need using the RPM packages. That is probably not what you want. You can copy the.
Single-pass processingin which the profiling stylesheet first selects the profiled content, stores it in an internal node-set, and then generates the output from that internal node-set. With Xalan, all the arguments to the command are entered as options, and the order of the options does not matter.
It gives you the same command shells and utilities that are available on Linux systems. Note that the XML document name precedes the stylesheet path in a Saxon command line. If your document contains xref or link cross references, then you may need to use the two-pass method. Try the following command to see if you do:. However, there is no harm in turning them on. Cygwin is a Linux-like environment that runs on Windows.
Re: [docbook-apps] unresolved xincludes with xsltproc
If a parameter value includes spaces or special characters, put it in quotes. If these steps proceed without error, you should be able to run this command to test it: You can find out which Java is on your system by executing java -version.
Then do the following:. Stylesheet options Chapter 6. The options will fail if the xercesImpl. Unpack the distribution archives the version numbers will be different from this example: The DocBook stylesheets have some custom extension functions written specifically for the Xalan processor. Once you have unpacked them, your environment’s PATH variable must include the locations of the command files like xsltproc.
The following is a list of the functions and their enabling parameters. If you are running a recent vintage of Linux, there is a good chance you will already have xsltproc installed on your system. Switching all cross references to use olink would permit you to use single-pass processing. Saxon and Xalan work, but xsltproc does not.
Any other elements that have an os attribute whose value does not match linux are ignored. Java versions Product name Java Versions Java 1. After you have marked your conditional content with profiling attributes, you select which content to include at runtime by setting certain profiling parameters.
It accepts the same profiling parameters as the single-pass profiling stylesheets. Two-pass processingin which you use a separate stylesheet that generates a profiled version into a temporary file, and then you process that temporary file with the standard DocBook stylesheet or customization. In this example, the parameter named use.
DocBook XSL: The Complete Guide
That site will also provide you with detailed instructions for getting started with Xalan. Languages, characters and encoding Document encoding Output encoding Saxon output character representation Special characters Special characters in output Space characters Missing characters Language support Using the lang attribute Using language parameters Language codes Extending the set of languages Text direction Chapter The Instant Saxon processor is a precompiled version of Saxon 6.
There is a version of xsltproc for Cygwin. If you have Java version 1. The DocBook Saxon and Xalan extensions are not enabled by default.
Using stylesheet parameters Parameters on the command line Parameters in a file Chapter 7. Unpack the archive Xalan is distributed as a zip file, so you need to unzip it into some suitable location.
Use the one closest to your Saxon version number. Stylesheet parameter Function More information use. The section on installing Saxon included an optional step for downloading the Xerces parser. Printed output options Page layout Paper size Finished page size Left and right margins Top and bottom margins Indenting body text Landscape documents Double sided Multi-column Double spacing Typography Body docboom title font families Font sizes Using renderas to style section titles Chapter and section numbering Depth of section numbering Numbering xltproc parts Page breaking Keep-together processing instruction Soft page breaks Hard page breaks PDF bookmarks Xsltprkc blank lines Cross reference page numbers Docbook icon graphics Admonition graphics Callout icons Printing one chapter Crop marks Part III.
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. And of course any elements that do not have an os attribute at all are included in the output as well.
Install xsltproc and FOP to generate a PDF from a docbook document
A separate stylesheet is available to perform just the profiling step, zsltproc also applying the DocBook style templates. To run the xsltproc processor, you need the libxml2 and libxslt packages, the ones with the highest version numbers. If you are not using any of these features in your documents, then you have no need to turn on the extensions.
The profiling stylesheets perform the normal DocBook XSL processing after doing the profiling step to select the content to process. Then the new Xalan will be used in place of the built-in Xalan that comes with Java 1.
Installing xsltproc on Linux.