# Chapter 5. HTML2 Plugin

Generating old-style HTML using map-driven processing

The HTML2 plugin extends the original Toolkit's HTML generation process by adding a map-driven process whereby the HTML generation for each topic is driven by processing of the root input map. This allows each topic to be processed with full knowledge of its use context in the map. This in turn enables a number of important functions:
• Numbering of topics and within-topic elements in terms of the topicref hierarchy in the map ("enumeration").
• Processing of topics in terms of semantics imposed by topicrefs (e.g., processing a generic topic as a "chapter" because it is referenced by a <chapter> topicref.
• Distinguishing separate uses of the same topic within a map in order to do automatic chunking and link rewriting.
• Generating HTML files in a structure different from the source file organization structure.
• Generation of literal HTML files for topic heads as though the topic heads were references to title-only topics.
• Generation of a back-of-the-book index and other publication-scope lists.

The HTML2 transform uses the base XHTML transformation type for general topic HTML generation. It accepts all the parameters for the base XHTML transform in addition to the HTML2-specific parameters documented in this section.