A multi-phase rendering process generates a document (such as a Web page)
using a template (e.g. HTML) containing embedded commands for inserting
content into the document. At least some of the commands have phases
associated with them. The template is rendered by executing all commands
having phases in a specified range of values while leaving any other
commands unexecuted, thereby producing a partially-rendered template. The
partially-rendered template is then rendered by executing the remaining
commands, to produce an output document. For example a first phase may
insert relatively static information into a Web page, while a second
phase inserts dynamic information at run time.