Easy Tutorial
❮ Obj Layout Master Set Obj Region End ❯

XSL-FO Block


XSL-FO output is located in block areas.


XSL-FO Page, Flow, and Block

Content "blocks" flow into "pages" and then output to the medium.

XSL-FO output is typically nested within the <fo:block> element, which is nested within the <fo:flow> element, which is nested within the <fo:page-sequence> element:


Block Area Properties

Blocks are output sequences contained within rectangular boxes:

Since block areas are rectangular boxes, they can share many common area properties:

Space before and space after are the spaces that separate blocks.

Margin is the blank area outside the block.

Border is the rectangle at the outer edge of the area. Each of its four sides can have different widths. It can also be filled with different colors and background images.

Padding is the area between the border and the content area.

Content area can contain actual content, such as text, images, graphics, etc.


Block Margin


Block Border

Border style properties:

Border color properties:

Border width properties:


Block Padding


Block Background


Block Styling Attributes

Blocks are output sequences that can be styled individually:

Font properties:

Text properties:


Example

Result:

| tutorialpro At tutorialpro you will find all the Web-building <br> tutorials you need, from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP. |

Please look at the example above, if you want to create a document with many headings and paragraphs, it will require a lot of code.

Usually, XSL-FO documents do not combine formatting information and content as we did just now.

With a little help from XSLT, we can put the formatting information into templates and write cleaner content.

You will learn how to use XSLT templates to combine XSL-FO in the later sections of this tutorial.

❮ Obj Layout Master Set Obj Region End ❯