Book File Specification
for MIF Doclet

Doug Kramer
Javadoc Team
Sept 22 2000

This document describes the specification for the addition of a book file to the MIF doclet. The book file provides a way of allowing the user to customize the order of the class and package files, add chapters, front matter, back matter, and book variables (replacing 36 command line options) all in a single file.

Add option to MIF Doclet to call book file:

     -book <file.xml>

Rough draft of pseudo-XML for book file:
Book File XML Format
DocBook File XML Format (not implemented)

Design criteria & goals for book file:
  1. Book file should contain two basic kinds of items:

  2. User can design and set up FM templates for a generic type of book and create individual book files for specific books

    The book file should let you publish a new book on a completely different set of packages with the same look that the templates provide. The only other requirement would be changing the options -book, -sourcepath, -d and possibly -J-Xmx.

    This means once the design is fixed, NO EDITING OF FRAMEMAKER FILES IS NEEDED to create books on new packages. Text can come from two sources: doc comments in the source code and narrative sections written in HTML (which can also be included in the source tree). For example, you could produce separate, finished books and PDF documents on JavaMail, JavaSpaces and JINI without having to open or look at a FrameMaker file.

  3. Allow:

    In other words, as a corollary to goal #2 above, once you design and set up FM templates and master book file, have the ability to publish an entire book by setting up only the subbook file (and the 4 mentioned options). The master book file could contain:

    Each "subbook" could have its own:

    To support nested subbooks:

  4. Make bookfile easily readable

  5. Want choice in the future to be able to:

    Solve this by writing a file at each run that is the book file but with all includes interpreted. The classlist would also be made explicit if it were previously implicit (because the default alphabetic order was used). Filename format: snapshot-yymmdd-time.xml, for example snapshot-000916-1200.xml. Put these in a directory "snapshot-bookfiles".

    The rationale for this is that the master file might be under someone else's control, and could change after your book is produced. This might also aid in debugging.

  6. Allow FrameMaker and HTML files for chapters.

    I believe we currently allow only HTML files to define a new chapter (perhaps not even that, if that code is broken since removing styles.mif) Consider allowing multiple HTML files within a single chapter (not previously allowed).

  7. Auto-generate the classlist for the user to re-order.

    Because a complete list includes inner classes, it is not possible to get a list of classes from a directory listing. Therefore, the doclet needs to generate this list. (Both static and non-static inner classes should be included in this list. By contrast, only static inner classes should be in the table of contents.) This list can be part of the snapshot mentioned above.

  8. Allow easy updating of classlist as source code is developed.

    If someone provides a classlist (to reorder the classes), it would be useful to have a way to easily tell at a later date if any classes have been added to the source tree. There are a couple of possible ways to do this:

  9. Allow all content specific to a particular book to be stored in text files (.java, .html) in the source tree. It therefore follows to allow relative paths to filenames in the book file to be relative to the source tree -- use -sourcepath for this.

Please send comments, suggestions and feedback to the MIF Doclet-Interest group, or just to the Javadoc team.