Patent ID: 7415452

Claim:
A method comprising: identifying a shared content element constraint that defines a content requirement common to all layout structures possible in a choice substructure in a hierarchical layout template; and associating the shared content element constraint with a root node of the choice substructure in the hierarchical layout template; wherein the content requirement common to all layout structures possible in the choice substructure corresponds to input content required by a node of the hierarchical layout template during generation of a page layout structure to format content to produce a document that combines layout and content; the method further comprising: receiving content elements to be presented according to the layout template; and traversing the layout template to generate a layout structure that accommodates the content elements, said traversing including traversing the hierarchical layout template based at least in part on the shared content element constraint associated with the root node; wherein said traversing the hierarchical layout template comprises generating a preferred layout based on penalty values associated with selected layout substructures.