Patent ID: 7243302

Claim:
A method of marking an input tree, the input tree describing a document and comprising a plurality of parent nodes and child nodes, wherein each parent node defines operations to be performed on child nodes of that parent node, said method comprising the steps of: (a) determining which of the plurality of nodes fit into a target area within the document; wherein said determining step comprises the sub-steps of: (a1) setting one of the plurality of nodes as a current node for the target area; (a2) comparing the size of the current node with available space in the target area; (a3) if the size of the current node is not greater than the available space, deciding that the current node fits into the target area; (a4) if the size of the current node is greater than the available space, performing the further sub-steps of: (a4i) determining whether the current node is a parent node; (a4ii) setting one of the child nodes as the new current node if the current node is a parent node; and (a4iii) recursively executing steps (a2) to (a4) with respect to the new current node; and (b) marking the nodes that fit into the target area with a common mark specific to the target area, such that a section of the input tree that fits into the target area is defined while preserving the structure of the input tree; and (c) outputting data elements in the target area, the data elements corresponding to the marked nodes.