6.3.2 The Style Language
The term formatting when used in this International Standard means any combination of the following:

•  the process that applies presentation styles to source document content and determines its position on the presentation medium,

•  the selection and reordering of content in the result document with respect to its position in the input document,

•  the inclusion of material not explicitly present in the input document, such as the generation of new material,

•  the exclusion of material from the input document in the result document.
DSSSL defines the visual appearance of a formatted document in terms of formatting characteristics attached to an intermediate tree called the flow object tree.  DSSSL allows enough flexibility in the specification so that it is not tied to a set of composition or formatting algorithms, i.e., line-breaking, page-breaking, or whitespace distribution algorithms, used by any particular formatting system.  These aspects of the layout process are specific to individual implementations. In this International Standard, line-breaking and page-breaking rules may be expressed in terms of constraints and other formatting characteristics that govern the formatting process. The output of the formatter, undefined in this International Standard, is a formatted document suitable for printing or imaging.
The formatting process uses the style-specification, which may include construction rules, page-model definitions, column-set-model definitions, and other general and application-defined declarations and definitions.
6.3.2.1 Components of the Formatting Process
The conceptual processes that constitute the formatting process are as follows:

1.  Build grove from SGML  document.

2.  Apply construction rules to the objects in the source grove to create the flow object tree.

3.  Define page and column geometry by characteristics on the page-sequence flow object and column-set sequence flow objects referring to page-models and column-set-models, respectively.

4.  Compose and lay out the content based on the rules specified by the semantics of the flow object classes and the values of the characteristics associated with those objects. Each flow object (an instance of a flow object class) is formatted to produce a sequence of areas having explicit dimensions and positioned by a parent in the flow object tree.
6.3.2.2 Grove Building
The formatting process uses the same grove building step as the transformation process to convert the SGML document into a grove of hierarchically structured objects.  For more information, see clause section 9, Groves.
6.3.2.3 Flow Object Tree
The grove is then further processed, using the construction rules, to create a flow object tree consisting of flow objects with the appropriate formatting and page-layout characteristics.  For the formal definition of the construction rules, see section 12.4.1, Construction Rules.  Each flow object (except an atomic flow object) has one or more sequences of flow object children.  Each sequence of flow object children is attached to a point of a flow object called a port. The port is either the principal port of the flow object, or it may be named.
A flow object class defines a set of formatting characteristics that apply to some category of flow objects.  Each flow object class also defines a set of port names.  The class of a child flow object shall be compatible with the class and port name of the port to which it is attached.  The flow objects attached to any particular port are ordered, but there is no order defined between flow objects attached to different ports of the same flow object.
The process of creating the flow object tree includes the following steps:

1.  Formatting characteristics are associated with each flow object.

2.  Nodes representing data characters from the grove are converted to character flow objects.  Each character flow object has characteristics governing glyph selection and style parameters such as font family, font weight, etc.
In constructing the flow object tree, SDQL may be used to identify portions of the SGML document that have specific formatting characteristics as well as those that can be treated together for purposes of flowing onto the same column or page. The content that is flowed together is placed as a sequence of flow objects in a port of the parent in the flow tree.

NOTE 3

For example, if a document consists of several normal paragraphs and some footnote paragraphs, the footnote paragraphs can be grouped as the content of a port of the parent flow object that represents the footnote.  Similarly, the normal paragraphs can be grouped in a port of a flow object representing a sequence of columns.
6.3.2.4 Flow Object Classes
The flow object classes and the characteristics that apply to them define the formatting appearance and behavior of the contents of the document.
The following flow object classes are provided in this International Standard:
Sequence flow object class
Display-group flow object class
Simple-page-sequence flow object class
Page-sequence flow object class
Column-set-sequence flow object class
Paragraph flow object class
Paragraph-break flow object class
Line-field flow object class
Sideline flow object class
Anchor flow object class
Character flow object class
Leader flow object class
Embedded-text flow object class
Rule flow object class
External-graphic flow object class
Included-container-area flow object class
Score flow object class
Box flow object class
Side-by-side flow object class
Glyph-annotation flow object class
Alignment-point flow object class
Aligned-column flow object class
Multi-line-inline-note flow object class
Emphasizing-mark flow object class
Flow object classes for mathematical formulae
Flow object classes for tables
Flow object classes for online display
In addition, DSSSL applications may define their own set of flow object classes as well as their own set of characteristics that may apply to these or to DSSSL-defined flow object classes.
6.3.2.5 Areas
The result of formatting a flow object is a sequence of areas. An area is a rectangular box with a fixed width and height. There are two types of areas: inline areas that are parts of lines and display areas that are not directly parts of lines.
Both types of areas are positioned by a process of filling.  The exact nature of the filling process is different for each of these types of areas. See section 12.3, Areas for more information on the filling of areas.
A display area is positioned by being filled into an area container.  The size of an area container may grow in the filling-direction, but is fixed in the other direction.
6.3.2.6 Page and Column Geometry
Page layout in DSSSL is specified by page-model characteristics on the page-sequence flow object and column-set-model characteristics on the column-set sequence flow object.
The page-sequence flow object is formatted to produce a sequence of page areas.  A page-model is the specification of the possible structure and positioning of the area hierarchy of the page, including the height and width of the page and the specification of page-regions. Page-regions are area containers with fixed dimensions into which formatted content is placed as specified by the page-region-flow-map. The page-region-flow-map provides the connection between the port name and a page-region. Each of the page-regions may have a header and a footer specification.  For complete information on the page-sequence flow object and the associated page models, see section 12.6.4, Page-sequence Flow Object Class and section 12.6.4.1, Page-model.
The column-set-sequence flow object is formatted to produce a sequence of column-set areas.  A column-set area contains a set of parallel columns.  The structure and positioning of each column-set area is controlled by the column-set-model to which it conforms.  A column-set-model specifies the possible hierarchy of areas for each column-set.  Column-sets may be nested.  The column-set area is divided geometrically in a direction parallel to the filling direction into a number of columns.  Associated with each column-set may be zones that constrain the placement of areas relative to other areas in the filling-direction.  The allowed zones are: top-float, body-text, bottom-float, and footnote.
The column-set-model specifies the possible structure and positioning of the area hierarchy of the column-set through the column-subset specification, the filling-direction specification, width and height specifications, etc. The column-subset specification includes a column-subset-flow-map that indicates the ports from which the contents are flowed into the specified zone.  The column-set-model also supports spanning.  For complete information on the column-set sequence flow object, see section 12.6.5, Column-set-sequence Flow Object Class; for complete information on the column-set-model, see section 12.6.5.1, Column-set-model.
6.3.2.7 Expression Language
The formatting process uses the core expression language defined in section 8.6, Core Expression Language or, as an optional feature, the full expression language as described in section 8, Expression Language.
Figure 3, Formatting Process illustrates the model of the formatting process.
6.3.2.8 Model for Coded Characters, Characters, and Glyph Identifiers
The formatting process uses the model for coded characters, characters, and glyph identifiers described in section 6.3.1.2, Model for Coded Characters, Characters, and Glyph Identifiers.