Real-time, on-demand dynamic document generation is disclosed. A merging
logic integrates one or more auxiliary files with a main file to
dynamically generate a displayed document. The merging logic determines
the number and the locations of the auxiliary files. The logic validates
each auxiliary file against a schema that defines how the auxiliary files
can modify the main file. After validation, the merging logic merges the
auxiliary files with the main file in accordance with the schema to
generate the document.