From the WikiPublisher

Wikipublisher: Wikibook DTD

The Wikipublisher library instructs PmWiki to generate xml output to a print-oriented DTD (document type definition). This appeared to be a more straightforward route than directly converting the xhtml for several reasons:

Investigations led to the tbook dtd [1] project on Sourceforge. Mapping the tbook entities to wiki markup showed that most (but not all) wiki markups had tbook xml equivalents. The wikipublisher project extended the tbook dtd to support all core PmWiki markups plus a number of Markup Extensions. To avoid confusion, the new dtd is called “wikibook”.

The wikibook dtd describes the structure of the page’s content, not its presentation. Presentation is left to the typesetting engine and is controlled, to a degree, through <meta> tags and their attributes. This approach generally works well, but it has some limitations, many arising from the physical differences between a scrolling colour screen and a fixed-size sheet of paper.

Style information is partially supported.

There are major differences between the css-based model used in xhtml (and implicit in PmWiki) and the structure-based approach used in the typesetting engine. Currently, there is no print equivalent to the rich style options found in xhtml. The approach taken is to translate those style options with recognisable equivalents (inline styles such as text colour blue), and ignore the rest (block styles such as place a red dotted border around this paragraph with a pale blue background).

Much, but not all, tabular material is supported.

True tables are supported well. Headings, captions, cell alignment and text wrap all map to their print equivalents. Where tables are used as a way to control the presentation of complex material, it currently works less well, especially with very long cells. It treats complex cells as “minipages” and keeps the content together on a page. As a result, if the cell contains more than a page of content, some will fall off the end of the page.

Division styles have limited support.

The wikibook dtd allows multiple block tags to be wrapped in a <group> tag, which is treated as a minipage. This area is under development. At the moment, groups are treated on a case-by-case basis. Significant additional work will be needed to create a mechanism for translating css properties to their typesetting equivalents. This will require a separate project, but only if there is sufficient demand.

The wikibook dtd can be inspected at http://www.wikipublisher.org/dtd/wikibook.dtd, or browsed at Wikibook.Home Page.

User Guide

Copyright © 2005–2017 the Wikipublisher wiki and its authors

Links

  1. tbookdtd.sourceforge.net

Retrieved from http://www.wikipublisher.org/wiki/Wikipublisher/WikibookDTD

Page last modified on 26 March 2009 at 02:39 PM