The Extensible Stylesheet Language (XSL) is a formal Recommendation put forward by the World Wide Web Consortium (W3C) as a language for expressing stylesheets. It complements the Extensible Markup Language (XML) by providing the methods for formatting content written in XML. One of the major goals of XML was keeping content and its semantic markup separate from its formatting, so that formatting could be applied independently. An XSL stylesheet describes the formatting that can be applied to XML files using an XSL processor. The XSL standard and XSL processors are described more fully in Chapter 2, XSL processors.
The DocBook XSL stylesheets were written by Norman Walsh to help people publish their DocBook content with XSL. The stylesheets are now an open-source project maintained on SourceForge. The stylesheet distribution consists of a collection of modular XSL files that are assembled into several complete XSL stylesheets. There is a stylesheet for generating a single HTML file, and one for generating multiple smaller HTML files from a single DocBook document. There are stylesheets for print output, XHTML output, HTML Help output, and JavaHelp output. The stylesheet collection is freely available for download. Since there are XSL processors for all major computer types, you can use DocBook on Unix, Linux, Windows, and Macintosh computers.
This book shows you how to use and customize the DocBook XSL stylesheets. It unlocks the power of these stylesheets by documenting all of their features and making them easy to use.
Applying an XSL stylesheet to an XML file is very straightforward process, once you get the tools working. Part I of this book tells you how to obtain and set up the XSL tools. It covers several XSL processors, and provides essential details for each one. It also covers XML Catalogs, which are used to map file references to actual directory locations on your system. XML Catalogs make the tools more versatile and portable.
Once you have the tools working, you can generate formatted print and HTML output from your DocBook XML documents. As you use the stylesheets, you will probably want to change certain aspects about the format or processing. The DocBook stylesheets provide a large number of options. The options are in the form of stylesheet parameters, which let you assign a value to a named variable that is used in the stylesheet. You can do quite a bit of customization of your output using just the parameters. Part II of this book describes the various stylesheet parameters and how to use them.
You will turn to Part III when you want to change something but you cannot find a parameter to do it. At that point you will need to do some stylesheet customization, which is done using the XSL language. You'll need to learn the syntax and methods of XSL, so that you can write a customization file with it. The chapters in Part III describe the methods of customization, as well as many applications for HTML and print output. You can use Appendix A, A brief introduction to XSL to get started with XSL, but it is beyond the scope of this book to teach you all about XSL. You will need a good XSL reference book to create extensive customization. You can also use Appendix B, Debugging XSL stylesheets for help with debugging your customizations.
Part IV of this book covers all of the special features of DocBook that require extra attention. That part is an encyclopedia of special topics, from bibliographies to websites. Use it as a reference when you need to process a certain feature, or browse it for new possibilities that you did not know DocBook could do.
Some examples of commands and code in this book are too long to fit on one line. Where a long line is broken to fit, the line will end with a backslash character "\". If you are using Microsoft Windows, you should omit the backslash character and join such a line to the following line. If you are using a Unix shell, you can use the example "as is".
|DocBook XSL: The Complete Guide - 4th Edition||PDF version available|
Copyright © 2002-2007 Sagehill Enterprises