9. A device according to claim 7, wherein the intermediate data structure generating means, when the template is represented by generation rules of a grammar from which hierarchal structures are derived, generates nodes in association with non-terminal symbols which appear in the generation rules and terminal symbols including operators and also generates as the intermediate data structure a tree structure configured by the nodes said nodes including an immediately subordinate node; the intermediate data structure holding means, in a node among the nodes, which is being generated in association with the operator, holds operator type information indicative of an operator type and manipulation history information indicative of a history of addition or deletion of the immediately subordinate node to or from the node being generated; and the intermediate data structure altering means executes the addition or deletion of a node to or from the tree structure based on the operator type information and the manipulation history information so that the logical structure of the specific document content conforms to the template.
7. A document layout processing device in which when a hierarchal structure representing logical divisions of a document content is defined as a logical structure and a hierarchal structure representing layout divisions of a document is defined as a layout structure, a structured document containing at least a logical structure of a specific document content and a template specifying constraints for generating a plurality of layout structures means for storing the plurality of layout structures and also for selectively generating a desired layout structure from among the plurality of stored layout structures, and a layout structure corresponding to the logical structure of the specific document content is generated on the basis of the template, the device comprising: intermediate data structure generating means for generating an intermediate data structure which is a hierarchal structure representing simultaneously both template information corresponding to the template and generation history information indicative of a generation history of a layout structure based on the template and also for generating as an initial state of the intermediate data structure a hierarchal structure corresponding to a minimum layout structure common to the plurality of layout structures generatable based on the template; intermediate data structure holding means for holding the intermediate data structure generated by the intermediate data structure generating means; intermediate data structure altering means for altering the intermediate data structure held in the intermediate data structure holding means by referring to the template information and the generation history information held in the intermediate data structure holding means so that the logical structure of the specific document content conforms to the template; and specific layout structure extracting means for extracting a layout structure corresponding to the logical structure of the specific document content from a latest intermediate data structure held in the intermediate data structure holding means.