| Free tutorials for Java, Eclipse and Web programming |
Version 1.6
Copyright © 2007 -2010 Lars Vogel
17.01.2010
| Revision History | ||
|---|---|---|
| Revision 0.1 - 0.5 | 28.06.2007 | Lars Vogel |
| Created | ||
| Revision 0.6 | 16.10.2008 | Lars Vogel |
| Adjusted the xinclude description | ||
| Revision 0.7 | 03.11.2008 | Lars Vogel |
| How to add external HTML code to the HTML output | ||
| Revision 0.8 | 17.04.2009 | Lars Vogel |
| Removed broken link, restructured article | ||
| Revision 0.9 | 25.07.2009 | Lars Vogel |
| Simplified installation description | ||
| Revision 1.0 | 26.07.2009 | Lars Vogel |
| added XSLT definition | ||
| Revision 1.1 | 10.08.2009 | Lars Vogel |
| Removed autobuilder | ||
| Revision 1.2 | 11.08.2009 | Lars Vogel |
| xinclude now using Eclipse XSL, update to Eclipse 3.5 | ||
| Revision 1.3 | 17.08.2009 | Lars Vogel |
| Simplified description | ||
| Revision 1.4 | 27.08.2009 | Lars Vogel |
| Typo fixed, removed xalan include and using the standard XML parser of JDK | ||
| Revision 1.5 | 12.09.2009 | Lars Vogel |
| Typo fixed | ||
| Revision 1.6 | 17.01.2010 | Lars Vogel |
| added suggested project to description | ||
Table of Contents
DocBook is a standard for creating well-formated plain text documents. It allows the creation of documentation that is portable between different operating systems and text processing tools. DocBook documents can easily be transformed into other output formats. DocBook is plain text and can therefore be writen in a text editor which supports plain text as output format and put under version control.
You can convert DocBook via XSLT to any other document format you want. XSLT stands for Extensible Stylesheet Language Transformation.
Stylesheets for converting DocBook to common output are available, e.g. to convert into HTML, pdf, java help or Unix man pages.
To translate the DocBook source file into other formats you need:
A XSLT Stylesheet to transform the DocBook document into another output format, e.g. html
A XSLT parser
A CSS style sheet to format your output
DocBook has two main document class, book and article.
Article: Used for writing technical articles. The main tag is article. Article is used in the following example.
Book: Used for longer description. The main tags is book. In addition to sections which are used in an article another structuring element exists, the chapter.
The following is an example of a DocBook document:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "../docbook-xml-4.5/docbookx.dtd"> <article> <articleinfo> <title>DocBook Intro</title> <author> <firstname>Lars</firstname> <surname>Vogel</surname> </author> </articleinfo> <sect1 label="1.0"> <title>An introduction to DocBook</title> <para> This is text. </para> </sect1> </article>
To create DocBook files and to convert them into other formats you have to use :
The DocBook DTD which defines how a DocBook must be written.
XSLT stylesheets to convert your DocBook into another format.
A XSLT parser
We will use Eclipse as an XML editor, Xalan as the XSLT parser and Apache Ant for the XSLT transformation.