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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.