Presentation by tree transformation

Structured documents are represented as trees. The layout or presentation of a document is also often modeled as a computation over a tree. But these trees are not generally the same. For instance, L/sup A/T/sub E/X converts a structured document to the T/sub E/X formatting hierarchy of boxes and glue. In other words, presentation is a mapping between trees. Casting it as a formal tree transformation offers both expressive, compact style specifications and efficient implementation. In our structured document system Ensemble, we have implemented a general framework for presentation by tree transformation. It consists of a core transformation engine; several distinct output tree languages or 'media'; and style files in a common language. To demonstrate its flexibility, we have built media for formatting programs, for presenting numerical data as graphs, and for displaying the tree structure of any document. We have also defined four efficiency requirements for interactive presentation, and tuned the implementation to meet each one.