Online and print versions

We already learned how to transform XML documents into HTML by means of a XSL style sheet processor. In principle we may create printed output by using a HTML Browser's print function. However the result will not meet reasonable typographical standards. A list of commonly required features for printed output includes:

Line breaks

Text paragraphs have to be divided into lines. To achieve best results the processor must implement the hyphenation rules of the language in question in order to automatically hyphenate long words. This is especially important for text columns of limited width as appearing in newspapers.

Page breaks

Since printed pages are limited in height the content has to be broken into pages. This may be difficult to achieve:

  • Large images being indivisible may have to be deferred to the following page leaving large amounts of empty space.

  • Long tables may have to be subdivided into smaller blocks. Thus it may be required to define sets of additional footers like to be continued on the next page and additional table headers containing column descriptions on subsequent pages.

Page references

Document internal references via ID / IDREF pairs may be represented as page references like see page 32.

Left and right pages

Books usually have a different layout for left and right pages. Page numbers usually appear on the left side of a left page and vice versa.

Very often the head of each page contains additional information e.g. a chapter's name on each left page head and the actual section's name on each right page's head.

In addition chapters usually start on a right page. Sometimes a chapter's starting page has special layout features e.g. a missing description in the page's head which will only be given on subsequent pages.


Footnotes have to be numbered on a per page basis and have to appear on the current page.