3.1 Formatting and rendering

3.1.1 Layout-based vs. content-based formatting

Layout-based formatting accommodates the medium being used to present information. The constraints of the medium, or the layout design created by the graphic artist, often demands absolute positioning, column location specification, or page number specification. For example, a magazine may need a particular columnist's article to appear on the right-hand edge of page 7, while the three lead stories must be headlined within the first four pages.

This focus on layout places more emphasis on the appearance and location of information than on the information itself, dictating the quantity and presentation of the content. Such layout is typically unstructured in both the authoring and the formatting processes, as typified by desktop publishing, journalism, etc.

Content-based formatting accommodates the information being presented with the available medium. The constraints of layout are expressed as rules associated with the information dictating how given information is to be positioned or presented. For example, a single aircraft maintenance manual cannot have each of its 40,000 to 60,000 pages individually formatted.

This focus on information places more emphasis on the content and rules of layout than on the medium, dictating the automatic layout and presentation of constructs found in the information stream. Such layout is usually highly structured in both the authoring and the formatting processes, as typified by technical publications found in pharmaceutical , aerospace, automotive, or other industries where either vast amounts of information are presented, or the information must be interchanged in a neutral form with other players.

XSL-FO 1.0 is oriented more to content-based formatting than to layout-based formatting, though there do exist certain controls for the positioning, cropping, and flowing of information to particular areas of pages in page sequences. XSL-FO can express the repetition of page geometries, mechanically accommodating the content as flowed by a transformation of the information into the formatting vocabulary. There is only limited support for specifying the order of page sequences, and high-caliber copy-fitting requirements often cannot be met with mechanical unattended transformations.

Note that while XSL-FO is not oriented to loose-leaf publishing, perhaps that will not prevent it from being used by a vendor to express the content of pages being maintained in a loose-leaf-based environment. A loose-leaf environment supports "change pages" (a.k.a. "A pages") through a database of effective pages and page contents.

XSL-FO has no inherent maintenance facilities for past versions of individual pages, and no inherent support for lists of effective pages. Such facilities could be provided outside the scope of individual page presentations. XSL-FO is more oriented to the unrestricted flowing of information to as much of the target medium as required to accommodate the content.

3.1.2 Formatting vs. rendering

When creating XML we should be designing the structures around our business processes responsible for maintaining the information, instead of the structures used for presentation. An XSL-FO instance describes the intent of how that stream of information is to be formatted in the target medium in a paginated fashion. This instance is typically generated by a stylesheet acting on an instance of XML information, rearranging and restructuring it into the order and presentation desired.

This reordering takes the element, attribute, and data content of the instance and repackages it according to our intent based on our understanding of the semantics of the XSL-FO vocabulary. We can reify this hierarchical reordering as an intermediate file of XML syntax which we can use for diagnostic purposes. We could also take the opportunity to store this reordering as an XML instance for "store and forward" strategies where the formatting takes place later or remotely from where the transformation takes place.

Unlike interactive formatting tools, such as desktop publishing products, there is no feedback loop from the XSL-FO formatter to the stylesheet creating the XSL-FO vocabulary. Therefore, the XSL-FO information must be complete with respect to all desired behaviors of the formatter. Any special formatting cases or conditions can be accommodated through contingencies expressed in the XSL-FO semantics.

The information arranged in the elements, attributes, and data of our source vocabularies is repackaged into the elements and attributes of the XSL-FO formatting vocabulary and the data of the XSL-FO instance that express the formatting objects and their properties of the XSL-FO semantics. Each formatting object specifies an aspect of either layout, appearance and impartation, or pagination and flow.

The layout semantics express the intent of locating information positioned on the target medium. Areas of content are specified as located and nested within other areas, in a hierarchical tree of rectangles on each page.

The appearance and impartation semantics express the intent of how the information is to be conveyed to the reader. For visual media, this conveyance includes font, size, color , weight, etc. For aural synthesis, this conveyance includes voice, volume, azimuth, pitch, etc.

The pagination and flow semantics express the intent of how the stream of information being presented is to be parceled within the layout areas. The final pagination is the result of accommodating the amount of flow being presented within the areas that have been defined.

Each of the formatting objects is expressed in an XSL-FO instance as an element. It is not necessary to know all formatting objects to get effective formatted results.

An XSL-FO formatter is responsible for interpreting the rendering intent, as expressed in the XSL-FO semantics corresponding to the elements and attributes in the instance. Following the Recommendation, the formatter determines what is to be rendered where by interpreting the interaction between formatting objects. How the formatter does this interpretation is defined in excruciating detail in the W3C Recommendation, as this document is written more for implementers than for stylesheet writers or XSL-FO instance creators .

The properties expressed for each of the objects influence or are included in the structure of the resulting areas. Some of these properties are specifically targeted for certain media and are otherwise ignored by media for which they do not apply.

The Recommendation does not describe in detail the semantics of rendering. Any device-specific rendition is effected from the final interpretation of the semantics of the formatting objects that create the trees of areas and the traits found in those areas that are derived from the properties. How the rendering agent actually accomplishes the task of effecting the result of formatting to the target medium is entirely up to the agent, as long as it produces the same result as the intent described by the Recommendation.

The rendering itself may be a multiple-step process, producing the final form through a staged expression of rendering through interpretation on a given medium. For example, the rendering may require production of another intermediate formatting language such as T E X. Rendering may directly produce a final-form page description language such as the Portable Document Format (PDF), or the Standard Page Description Language (International Standard ISO/IEC 10180). The physical final form would then be produced from the intermediate form or final page representation. Indeed, there could be many steps to obtain a final result, e.g. XML to XSL-FO to T E X to PDF to paper.



Definitive XSL-FO
Definitive XSL-FO
ISBN: 0131403745
EAN: 2147483647
Year: 2002
Pages: 99
Authors: G. Ken Holman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net