Creating Block-Level Content: <fo:block>

Blocks are essential in XSL-FO; you use blocks in XSL-FO to create rectangular display areas set off from other display areas in a document. You can use the <fo:block>formatting object for formatting such items as paragraphs, titles, headlines, figure and table captions, and so on. Here’s an example from the beginning of the chapter where I’m creating a block element and specifying various properties and the text in the block:

<fo:block font-family="Times" line-height="48pt" font-size="36pt"> 
    Welcome to XSL formatting. 
</fo:block> 

You can use the following properties with <fo:block>:

  • Common accessibility properties: source-document, role

  • Common aural properties: azimuth, cue-after, cue-before, elevation, ...

Get Inside XSLT now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.