- The FO document. Each XML document and therefore
also an FO document has a hierarchical structure that can be modeled
as a tree.
- The FO DOM tree. This tree has the same
hierarchical structure as an FO document, and is often built from an
XML document.
FOP can work from either an FO document or an FO DOM tree.
FOP does not build a DOM tree from an FO document.
- The FO tree. FOP builds this tree from either the FO document or
the FO DOM tree. The FO nodes in this tree correspond to the
elements in the FO document or the XML nodes in the FO DOM
tree. Note, however, that they are different from DOM tree
nodes.
When a sufficient part of the FO tree has been built (in
current FOP the subtree of a PageSequence FO node), the layout process
is started. This process builds three trees.
- The LM tree. This tree corresponds closely to the FO
tree because each FO node creates a layout manager. But there are
deviations. For example, a BlockLayoutManager creates a
LineLayoutManager for each consecutive sequence of child FO nodes that
generate inline areas.
- The BP tree. Each layout manager returns zero or more
BreakPoss to its parent. These BreakPoss are connected to BreakPoss
that the layout manager received from its child layout managers. This
is not a real tree. There are many BP without a parent BP. They are
connected to their siblings by their LM.
- The Area tree. Using the information stored in the BP
tree and in the LMs connected with the BPs, layout areas are
constructed. These areas are placed within other areas, which is
expressed in a tree hierarchy.