5. Files in docbook format

DocBook format documents are stored in directory docs in svn directory.

For example, this document is written as docs/Document-HOWTO/C/Kondara-Doucment-HOWTO.xml, a DocBook file. To modify this document, go todocs/Document-HOWTO/C directory, and edit Doucment-HOWTO.xml.

Documents under this directory is basically xml files written in accordance with XML Document Type Definition (DTD). Documents that can be seen on the web site, including this one, are html files created by xsl conversion from xml source files.

Details about DocBook itself can be found at: Practical DocBook Guide for Beginners (in Japanese), and LDP Author Guide are available from Linux JF Project

5.1. DocBook style sheed

5.1.1. What is a style sheet?

This document is stored in here but if you try to see it with a browser, things may not look right.

To change it in to something like this you need to use style sheet.

There are dsssl and xslt style sheet that DocBook can use but Momonga Project has chosen xslt for its simplicity in maintaing the style sheet.

There are style sheet, dsssl and xslt, that you can use with DocBook. The Momonga Project employed xslt for its simplicity for maintenace.

If an environment that can do xslt conversion is at hand, you can check how it would appear once it is put on http://www.momonga-linux.org/. Also errors in creating html files can be avoided by performing a conversion at hand after all the editing is complete.

5.1.2. Style sheet to use

Style sheet that are actually used at http://www.momonga-linux.org/ are also maintained by svn and committed as docs/docbook.xsl docs/onehtml.xsl

These style sheets are "Drivers" and style sheet itself is included in a package, docbook-style-xsl-version-releasem.noarch.rpm. [3]

5.1.3. Try it out

Referring to Section 3.3.2, “docs directory”, create a Makefile. After doing so, in docs run make command. It will take a while to create all html files converted from xml files. If you want to ckeck result of, say, only one .xml file, do make in the directory where the .xml file exist.

When it is complete, under each document directory there will be

  • index.html

  • structured html files for each section that are linked from the index.html

  • changelog.html

  • directory name_all.html

  • directory name.txt



[3] Here you can take "drivers" as something that call and give certain parameter(s) to the style sheet.