XSL_Formatting_Objects

Sample XSL formatting objects

Sample XSL formatting objects XSL-FO documents are XML files with output information. They contain information about the output layout and output contents. XSL-FO documents are stored in files with a .fo or a .fob file extension. It is also quite common to see XSL-FO documents stored with an .xml extension, because this makes them more accessible to XML editors. <?xml version=”1.0″ encoding=”ISO-8859-1″?> <fo:root xmlns:fo=”http://www.w3.org/1999/XSL/Format”> <fo:layout-master-set> <fo:simple-page-master master-name=”A4″> …

Sample XSL formatting objects Read More »

Formatting Object Basics

Formatting Object Basics Page Layout The root element of a formatting objects document is fo:root. This element contains one fo:layout-master-set element and one or more fo:page-sequence elements. The fo:page-sequence elements contain content; that is, text and images to be placed on the pages. The fo:layout-master-set contains templates for the pages that will be created. When the formatter reads an XSL-FO document, …

Formatting Object Basics Read More »

Common Formatting Objects

Common Formatting Objects • page-sequence–a major part (such as front or body) in which the basic page layout may differ from other parts • flow–a chapter- or section-like division within a page-sequence • block–a paragraph (or title or block quote, etc.) • inline–e.g., a font change within a paragraph • wrapper–a “transparent” object usable as …

Common Formatting Objects Read More »

Page Layout

Page Layout The root element of a formatting objects document is fo:root. This element contains one fo:layout-master-set element and one or more fo:page-sequence elements. The fo:page-sequence elements contain content; that is, text and images to be placed on the pages. The fo:layout-master-set contains templates for the pages that will be created. When the formatter reads …

Page Layout Read More »

Content

The content (as opposed to markup) of an XSL-FO document is mostly text. Non-XML content such as GIF and JPEG images can be included in a fashion similar to the IMG element of HTML. Other forms of XML content, such as MathML and SVG, can be embedded directly inside the XSL-FO document. This content is stored in several kinds of elements including: • Block-level formatting objects • Inline formatting objects …

Content Read More »

Leaders and Rules

Leaders and Rules A rule is a block-level horizontal line inserted into text similar to the line below the chapter title on the first page of this chapter. The HR element in HTML produces a rule. A leader is a line that extends from the right side of left-aligned text in the middle of a line to the left side of some …

Leaders and Rules Read More »

Graphics

XSL-FO (Formatting Objects )provides two elements for embedding pictures in a rendered document. The fo:external-graphic element inserts a non-XML graphic, such as a JPEG image. The fo:instream-foreign-object element inserts an XML document that is not an XSL-FO document, such as an SVG picture or a MathML equation. fo:external-graphic The fo:external-graphic element provides the equivalent of an HTML IMG element. That is, it loads an image, probably in a non-XML format, …

Graphics Read More »

Inlines

Inlines The fo:inline element has no particular effect on the layout of the page. Rather it’s an element on which you can hang formatting attributes such as font-style or color for application to the inline’s contents. The fo:inline formatting object is a container that groups inline objects together. It cannot contain block-level elements. For example, you can use fo:inline elements to add style to …

Inlines Read More »

Footnotes

Footnotes The fo:footnote element creates a footnote. The author places the fo:footnote element in the flow exactly where the footnote reference such as 1 or * will occur. The fo:footnote element contains both the reference text and a fo:footnote-body block-level element containing the text of the footnote. However, only the footnote reference is inserted inline. The formatter places the note text in …

Footnotes Read More »

Floats

A fo:float produces a floating box anchored to the top of the region where it occurs. A fo:float is most commonly used for graphics, charts, tables or other out-of-line content that needs to appear somewhere on the page, although precisely where it appears is not particularly important. For example, this fo:block includes a floating graphic with a caption: <fo:block> Although PDF files …

Floats Read More »

Formatting Properties

By themselves, formatting objects say relatively little about how content is formatted. They merely put content in abstract boxes, which are placed in particular parts of a page. Attributes on the various formatting objects determine how the content in those boxes is styled. As already mentioned, there are more than 200 different formatting properties. Not …

Formatting Properties Read More »

Scroll to Top