Basics of XSL-FO

XSL layout control is based on Formatting Objects, which are rectangular areas similar to boxes in CSS. These areas have a number of properties, and they can contain other areas, images, text, and so on.

An easy way to look at this is to look at some of the objects used to represent tables:

  • fo:table

  • fo:table-column

  • fo:table-row

  • fo:table-cell

Each of these XSL-FO elements represents a different object, some of which contain other objects, such as fo:table which can contain table-column, table-row, and table-cell objects. Those objects in turn contain objects (rows and columns contain cells) or they can contain content: table-cell objects will contain the text or images contained in the table.

Each of these objects will also have properties associated with it, either specific to the object, or generic properties that can be applied to multiple objects. For example, if we wanted to specify that the font to be used in a table cell:

<fo:table-cell> 
 <fo:block font-family="Helvetica, Arial, sans" font-size="12pt">
Some Content
 </fo:block>
</fo:table-cell>

Here we have a table-cell object, which contains a block object. That block object contains some text, but it also makes use of the font-family property to specify the type of font that should be used in rendering the contents of that cell.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.204.201