The latest version of this document is kept in several formats here: HTML, PDF, HTML Help, original docbook XML source.
Copyright © 2003
| Revision History | |
|---|---|
| Revision 1 | June 2003 |
Initial draft | |
| Revision 2 | Oct 2 2003 |
Fixed several small problems in scripts, edited text | |
Abstract
Short stepwise guide to installing docbook with some custom scripts to quickly allow you to generate content in HTML, HTML Help and PDF by a click.
Table of Contents
You need to do this:
Optional: Get docbook here: http://www.oasis-open.org/docbook/xml/, extract somewhere.
Get Docbook XSL (the code doing the converting) (homepage: http://docbook.sourceforge.net/), I found it under "Projects", "XSL..." http://docbook.sourceforge.net/projects/xsl/index.html linked to download page here: http://sourceforge.net/project/showfiles.php?group_id=21935. Remember where you extract it since you will need that information below.
Get java here http://java.sun.com/j2se/ (click downloads) if you dont have it
Get instant saxon (that's what I did, easy one .exe - scroll down). It contains one exe, put it in your C:\WINDOWS (95/98/XP) or C:\WINNT catalogue.
To make PDFs, get FOP from http://xml.apache.org/ and extract someplace (remember where!) (I found it here: http://xml.apache.org/fop/download.html - choose binary of course).
You also need to get jimi for the pdfs, check out the FOP releasenotes for info, I found jimi here: http://java.sun.com/products/jimi/, like the FOP releasenotes say "then extract the archive, then copy JimiProClasses.zip to FOP's lib dir and rename it to jimi-1.0.jar."
To make HTML Help you need the HTML Help workshop (as of this writing homepage here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconhh1start.asp), I found it here: http://go.microsoft.com/fwlink/?LinkId=14188. Install it, go to its directory (normally C:\Program Files\HTML Help Workshop) and copy the program file "hhc.exe" to your windows catalogue (C:\WINDOWS or C:\WINNT on WinNT/2000)
Finally, get my scripts (here http://mawi.org/articles/docbook-scripts.zip), extract somewhere, and make a few small edits: In "docmake.bat", edit the following lines to where you extracted the scripts and where you extracted fop:
SET scriptpath=C:\priv\stuff\docbook\scripts SET defstylepath=%scriptpath% SET fop=C:\priv\stuff\docbook\fop-0.20.5\fop.bat |
and in style-hh.xsl, style-html.xsl, style-pdf.xsl - edit the italic part of the following line to where you extracted the docbooks XSL:
<xsl:import href="file:///C:/Program Files/Altova/xmlspy/Stylesheets/docbook-xsl-1.61.3/htmlhelp/htmlhelp.xsl"/>
|
. Finally, copy "docmake.bat" to your windows catalogue (C:\WINDOWS or C:\WINNT) and run the registry to make "Docmake XML make" menuitem appear on all XML files context menu in windows file explorer.
After all this is done, try it out on a file! It takes a while - so wait for it. It will create a "file-pub" directory with all generated files. Note! My scripts only work on files with no spaces! So please replace spaces with underscores.
This was done really quick! Feedback any problems please; thx!
DocBook XSL: The Complete Guide. Sagehill Enterprises. Copyright © 2002,2003. URL: http://www.sagehill.net/docbookxsl/ .
Docbook Frequently Asked Questions. Copyright © 2001. URL: http://www.dpawson.co.uk/docbook/ .
DocBook XSL Stylesheet Documentation. Copyright © 1999, 2000, 2001, 2002. URL: http://docbook.sourceforge.net/release/xsl/current/doc/ .
MVPS HTML Help FAQ. Copyright © 2001. FAQ on mvps site, not the MS HH FAQ - URL: http://www.mvps.org/htmlhelpcenter/htmlhelp/hhfaq.html .