About the Toot-O-Matic
Design Goals
Tutorial Layout
XML Document Design
XSLT Source Code
Summary
In this chapter, we'll examine a tutorial-building tool called the Toot-O-Matic. Developed by yours truly for IBM's developerWorks web site (http://www.ibm.com/developerWorks, check your local listings), it's a good example of how stylesheets can drive a sophisticated publishing system for structured information. Our tool is built around the Xalan XSLT processor, the Apache XML Project's FOP tool, and various Java facilities (such as the JPEGCodec class).
Tutorials are the most popular kind of content at developerWorks. Unfortunately, in the early days of the site, we didn't have good tools for creating tutorials. We often started with a document written in a word processor, then we printed it as a PDF file, then we converted it to an HTML file, then we broke the single HTML file into smaller pieces to represent the various panels of the tutorial. Much of this was a tedious, error-prone process that cried out for automation. The Toot-O-Matic handles most of the work necessary to generate files, allowing the tutorial author and production staff to focus on more important things.
To publish a tutorial, we need to create several kinds of output:
A web of interlinked HTML files. There should be an introductory panel for the tutorial. It should contain links to all sections of the tutorial. From each panel, there are links to the previous and next panels, as well as links to the Main menu and a section index. All these links are separate HTML files that refer to one another.
A pair of PDF files. We produce two PDF files, one with letter-sized pages and one with A4-sized pages. Each PDF file contains a table of contents that lists the different sections of the tutorial. Whenever possible, the graphics used in the tutorial should be part of the PDF file, and any hyperlinks in the tutorial (links between panels, or links to web resources) should be part of the PDF file, as well.
A zip file. Many of our customers told us that Internet access was too slow or too expensive for them to read our tutorials online. With a zip file, customers can download everything they need to run the tutorial on their machines without being connected to the Web.
Copyright © 2002 O'Reilly & Associates. All rights reserved.