Patent ID: 8595618

Claim:
A computer program product for generating a representation of a document from eXtensible Markup Language (XML) code describing the document, comprising: a computer-readable storage medium; and instructions encoded on the computer-readable storage medium that, when executed by a processor, cause the processor to: substitution-process the XML code describing the document to generate substitution-processed XML code, wherein substitution-processing comprises: identifying, within the XML code describing the document, a conditional logic portion that comprises an expression and data; determining a Boolean value of the expression; modifying, if the determined value is “true,” the XML code describing the document by replacing the conditional logic portion with the data; and modifying, if the determined value is “false,” the XML code describing the document by removing the conditional logic portion; composition-process the substitution-processed XML code to generate composition-processed XML code, wherein composition-processing comprises: identifying, within the substitution-processed XML code, content that is to be flowed; identifying, within the substitution-processed XML code, a template through which the identified content is to be flowed; determining whether the identified content fits within one instance of the identified template; and modifying, if the identified content does not fit within one instance of the identified template, the substitution-processed XML code to specify an additional instance of the identified template; imposition-process the composition-processed XML code to generate imposition-processed XML code, wherein imposition-processing comprises: identifying a code portion within the composition-processed XML code that is specified as being a logical page; identifying a requested physical page size that represents a physical sheet of material; and modifying the composition-processed XML code to implement the requested physical page size by specifying one or more physical pages, wherein a physical page includes multiple logical pages, and wherein modifying the composition-processed XML code comprises changing a position of a <page> tag within the composition-processed XML code; and generate, based on the imposition-processed XML code, the representation of the document using a page description language.