Unicorn Formatting Objects (UFO), Version 1.00.01 Support for XSL Formatting Objects and Properties HTML Back-End Created: 29-Sep-2000 Copyright (C) 2000, Unicorn Enterprises SA All rights reserved 1 Introduction -------------- This document defines the subset of XSL formatting objects and their properties as supported by UFO version 1.00.01 using the HTML back-end. UFO supports also TeX back-end, which is not discussed here. The detailed description of TeX back-end features is available as a separate document included in the product distribution: Unicorn Formatting Objects (UFO), Version 1.00.01 Support for Formatting Objects and Properties TeX Back-End 2 General Notes --------------- Notational Conventions ---------------------- Known unsupported yet important features are marked with the ISSUE prefix in this document. In most cases, the decent effort will be made to implement them in the near future. ISSUE: Create a summary of all current ISSUEs at the end of this document. Front-end and Back-end ---------------------- The UFO HTML front-end (written in C++) generates the HTML 4.0 output. The Web browser that implements HTML 4.0 can be used as a back-end to render the generated document. Since the Cascading Stylesheets Level 2 (CSS2) technology is extensively used, the browser with the decent support for CSS2 is required. Version of XSL Specification ---------------------------- The current release is based on the W3C specification "Extensible Stylesheet Language (XSL) Version 1.0" W3C Working Draft 27 March 2025 (http://www.w3c.org/TR/2000/WD-xsl-20000327) No claims are made about the conformance. Use of CSS2 Specification ------------------------- XSL specification does not define many important features. Instead, explicit (and in some cases implicit) references are made to CSS2 specification. Implementation of such features is based on the W3C specification "Cascading Stylesheets, Level 2 (CSS2)" W3C Recommendation 12 May 2024 (http://www.w3c.org/TR/1998/REC-CSS2-19980512) Formatting Objects, Properties and Property Values -------------------------------------------------- The following formatting objects are currently supported: fo:root fo:declarations fo:page-sequence fo:layout-master-set fo:page-sequence-master fo:single-page-master-reference fo:simple-page-master fo:region-body fo:flow fo:static-content fo:title fo:block fo:character fo:external-graphic fo:inline fo:table-and-caption fo:table fo:table-column fo:table-caption fo:table-header fo:table-footer fo:table-body fo:table-row fo:table-cell fo:list-block fo:list-item fo:list-item-body fo:list-item-label fo:simple-link fo:wrapper For all other formatting objects, UFO implements the appropriate fallbacks according to provisions of XSL WD (Chapter 8, "Conformance"). Detailed discussion of support for all formatting objects can be found in the following sections of this document. For each object type the list of supported properties is given as well. For unsupported formatting objects, the fallback implementation is described. Units of Measure ---------------- All units of measure defined by XSL except 'px' (pixels) are supported. In the internal calculations as well as in the output TeX code, for all properties except 'font-size', units of measure are converted to millimeters. For the 'font-size' property, units of measure are converted to points. Color Values ------------ Hexadecimal color values having the format #[a-fA-F0-9] are supported. Maximum of 6 hexadecimal digits allowed. These values represent RGB colors in the way similar to one described in HTML 4.0 specification. The following named color values are supported: aqua #00FFFF black #000000 blue #0000FF fuchsia #FF00FF gray #808080 green #008000 [sic!] lime #00FF00 maroon #800000 navy #000080 olive #808000 purple #800080 red #FF0000 silver #C0C0C0 teal #008080 white #FFFF00 An additional color value orange #FF8000 is supported for interoperability with the PassiveTex package. Percentages ----------- Percentages in property values are supported when applicable. Shorthand Properties -------------------- The following shorthand properties are supported border-width border-color border-style border-top border-right border-bottom border-left border font margin padding white-space The 'vertical-align' is implemented as a normal (not a shorthand) property. Expressions ----------- XSL expressions are not implemented. The only exception is the minus sign that can precede numeric values. Inheritance ----------- Property inheritance is supported. A property that is implemented in this release may be assigned to a formatting object of any type allowed by XSL/CSS2, even if this formatting object makes no direct use of this property. The property value may be inherited and used by some child formatting object. In this document, properties of this kind are mentioned explicitly only for the formatting object types that make the direct use of them; however, for inheritance purposes these properties are supported also for other object types when allowed by XSL/CSS2. Writing Modes ------------- The 'writing-mode' property is not supported. By default, the 'lr-tb' writing mode is assumed. The relative margin, border and padding properties that contain 'before', 'after', 'start' and 'end' in their names are interpreted according to this writing mode. Margin Properties ----------------- The following margin properties are supported: margin-top margin-bottom margin-left margin-right margin-before margin-after margin-start margin-end space-before space-before.optimum space-after space-after.optimum In the sections that describe properties supported for each formatting object type, these properties are referenced collectively as "Margin Properties". Properties 'space-before' and 'space-before.optimum' are interpreted as corresponding to 'margin-top'; properties 'space-after' and 'space-after.optimum' are interpreted as corresponding to 'margin-bottom'. Margin collapsing/space resolution is not supported. ISSUE: Margin collapsing/space resolution is an important feature. It should be implemented in the near future. Border Properties ----------------- The following border properties are supported: border-top-style border-bottom-style border-left-style border-right-style border-before-style border-after-style border-start-style border-end-style border-top-color border-bottom-color border-left-color border-right-color border-before-color border-after-color border-start-color border-end-color border-top-width border-bottom-width border-left-width border-right-width border-before-width border-after-width border-start-width border-end-width In the sections that describe properties supported for each formatting object type, these properties are referenced collectively as "Border Properties". Padding Properties ------------------ The following padding properties are supported: padding-top padding-bottom padding-left padding-right padding-before padding-after padding-start padding-end In the sections that describe properties supported for each formatting object type, these properties are referenced collectively as "Padding Properties". Font Properties --------------- The following font properties are supported: font-family font-style font-variant font-weight font-size In the sections that describe properties supported for each formatting object type, these properties are referenced collectively as "Font Properties". The following generic font families are supported serif Times sans-serif Helvetica cursive ZapfChancery monospace Courier The 'fantasy' generic font family is not supported since there is no true fantasy font among 35 standard PostScript fonts. Properties Related to White Spaces ---------------------------------- The following properties related to white spaces are supported: linefeed-treatment space-treatment white-space-collapse The property 'wrap-option' is supported in a special way. If this property has the value of 'no-wrap', it is interpreted as if 'linefeed-treatment' would be set to 'preserve' (the actual value of 'linefeed-treatment' is ignored in this case). 3. Declaration and Pagination and Layout Formatting Objects ----------------------------------------------------------- Introduction ------------ The HTML back-end of UFO processor was designed primarily for viewing documents using non-paged devices. Therefore, features related to pages are not supported by HTML back-end. If a complex page-sequence-master is required for a given page-sequence, the first simple-page-master referenced in the content of the complex page-sequence-master will be used for the actual rendering of this page-sequence. fo:root ------- No individual properties supported. fo:declarations --------------- No individual properties supported. fo:color-profile ---------------- This formatting object class is handled with the fallback. fo:page-sequence ---------------- The following properties are supported: master-name fo:layout-master-set -------------------- No individual properties supported. fo:page-sequence-master ----------------------- The following properties are supported: master-name This formatting object class is handled with the fallback. The page-master referenced in the first child is used. fo:single-page-master-reference ------------------------------- The following properties are supported: master-name fo:repeatable-page-master-reference ----------------------------------- The following properties are supported: master-name This formatting object class is handled with the fallback. The page-master referenced in the first child is used. fo:repeatable-page-master-alternatives -------------------------------------- This formatting object class is handled with the fallback. The page-master referenced in the first 'fo:conditional-page-master-reference' child is used. The following properties are supported: maximum-repeats fo:conditional-page-master-reference ------------------------------------ This formatting object class is handled with the fallback. The page-master referenced in the first 'fo:conditional-page-master-reference' child is used. The following properties are supported: master-name fo:simple-page-master --------------------- The following properties are supported: master-name page-width Margin Properties fo:region-body -------------- The following properties are supported: region-name Margin Properties fo:region-before ---------------- This formatting object class is handled with the fallback. The content of the corresponding 'fo:static-content' object is rendered before content of the body region The following properties are supported: region-name fo:region-after --------------- This formatting object class is handled with the fallback. The content of the corresponding 'fo:static-content' object is rendered after content of the body region The following properties are supported: region-name fo:region-start --------------- This formatting object class is handled with the fallback. The content of the corresponding 'fo:static-content' object is rendered before content of the body region The following properties are supported: region-name fo:region-end ------------- This formatting object class is handled with the fallback. The content of the corresponding 'fo:static-content' object is rendered after content of the body region The following properties are supported: region-name fo:flow ------- No individual properties supported. The 'flow-name' property, if specified, will be ignored by the front-end. fo:static-content ----------------- The following properties are supported: flow-name fo:title -------- No individual properties supported. Content of the first 'fo:title' formatting object in a document is interpreted as the title of generated HTML document. 4. Block-level Formatting objects --------------------------------- Introduction ------------ Algorithms described in CSS2 are used to calculate vertical and horizontal parameters of block objects (height, width, margins, border-widths, paddings); the support for 'auto' property values is provided when appropriate. fo:block -------- The following properties are supported: height width min-height min-width max-height max-width background-color Margin Properties Border Properties Padding Properties Font Properties color line-height linefeed-treatment space-treatment text-align text-indent white-space-collapse wrap-option fo:block-container ------------------ This formatting object class is handled with the fallback. The processor displays indication that content cannot be correctly rendered. 5. Inline-level Formatting Objects ---------------------------------- fo:bidi-override ---------------- This formatting object class is handled with the fallback. The processor displays indication that content cannot be correctly rendered. fo:character ------------ The following properties are supported: character Font Properties color fo:initial-property-set ----------------------- This formatting object class is handled with the fallback. Any properties specified on this object are ignored. fo:external-graphic ------------------- The following properties are supported: height width content-height content-width text-align vertical-align src fo:instream-foreign-object -------------------------- This formatting object class is handled with the fallback. The processor displays indication that content cannot be correctly rendered. fo:inline --------- The following properties are supported: Font Properties color fo:inline-container ------------------- This formatting object class is handled with the fallback. The processor displays indication that content cannot be correctly rendered. fo:leader --------- This formatting object class is handled with the fallback. The formatting object is ignored by the processor. fo:page-number -------------- This formatting object class is handled with the fallback. The formatting object is ignored by the processor. fo:page-number-citation ----------------------- This formatting object class is handled with the fallback. The processor displays indication that content cannot be correctly rendered. 6. Table Formatting Objects --------------------------- fo:table-and-caption -------------------- The following properties are supported: background-color Margin Properties Border Properties Padding Properties caption-side fo:table -------- The following properties are supported: width background-color Margin Properties Font Properties color fo:table-column --------------- The following properties are supported: column-width background-color Border Properties fo:table-caption ---------------- The following properties are supported: height min-height min-width background-color Border Properties Padding Properties fo:table-header --------------- The following properties are supported: background-color Border Properties fo:table-footer --------------- The following properties are supported: background-color Border Properties fo:table-body ------------- The following properties are supported: background-color Border Properties fo:table-row ------------ The following properties are supported: height background-color Border Properties fo:table-cell ------------- The following properties are supported: background-color Border Properties Padding Properties Font Properties color linefeed-treatment space-treatment text-align text-indent white-space-collapse wrap-option Cells spanning several columns and/or rows are not yet implemented. 7. List Formatting Objects -------------------------- The complete set of list formatting objects is supported. In the current release, the horizontal layout of a list is fully controlled by the 'margin-left', 'margin-right', 'provisional-label-separation' and 'provisional-distance-between-starts' properties as follows: The distance between the left edge of the containing block and the left edge of the label if equal to 'margin-left'. The distance between the right edge of the label and the left edge of the body is equal to 'provisional-label-separation'. The block width is equal to the width of the containing block minus 'margin-left' minus 'provisional-distance-between-starts' minus 'margin-right'. The distance between the right edge of the body and the right edge of the containing block is equal to 'margin-right'. fo:list-block ------------- The following properties are supported: Margin Properties provisional-label-separation provisional-distance-between-starts fo:list-item ------------ The following properties are supported: Margin Properties (vertical margins only) fo:list-item-block ------------------ No individual properties supported. Note that the 'start-indent' property, as well as 'body-start()' function suggested by XSL WD are not supported. The XSL WD specification on this subject appears to be somewhat controversial, since 'start-indent' is not listed among the properties allowed for 'fo:list-item-block'. fo:list-item-label ------------------ No individual properties supported. Note that the 'end-indent' property, as well as 'label-end()' function suggested by XSL WD are not supported. The XSL WD specification on this subject appears to be somewhat controversial, since 'end-indent' is not listed among the properties allowed for 'fo:list-item-label'. 8. Link an Multi Formatting Objects ----------------------------------- fo:simple-link -------------- The following properties are supported: Font Properties color external-destination internal-destination fo:multi-switch --------------- This formatting object class is handled with the fallback. Contents of the first eligible multi-case formatting object is utilized. fo:multi-case ------------- This formatting object is used as a wrapper for the fallback for multi-switch. The following properties are supported: starting-state fo:multi-toggle --------------- This formatting object class is handled with the fallback. Content is promoted to the parent formatting object. fo:multi-properties ------------------- This formatting object class is handled with the fallback. Content is promoted to the parent formatting object. fo:multi-property-set --------------------- This formatting object class is handled with the fallback. It is ignored by the processor. 9. Out-of-Line Formatting Objects --------------------------------- fo:float -------- This formatting object class is handled with the fallback. It is placed inline. fo:footnote ----------- This formatting object class is handled with the fallback. It is placed inline. fo:footnote-body ---------------- This formatting object class is handled with the fallback. It is placed inline. 10. Other Formatting Objects ---------------------------- fo:wrapper ---------- This formatting object may be used to specify inherited properties for a group of formatting objects. fo:marker --------- This formatting object class is handled with the fallback. It is ignored by the processor. fo:retrieve-marker ------------------ This formatting object class is handled with the fallback. The processor displays indication that content cannot be correctly rendered.