Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XSL-FO Tables

XSL-FO Tables


XSL-FO uses fo:table-and-caption element to define a table.


XSL-FO Tables

The XSL-FO table model is not entirely different from the HTML table model.

There are nine XSL-FO objects that can be used to create tables:

XSL-FO uses fo:table-and-caption element to define a table. It contains a <fo:table> and an optional fo:caption .

fo:table element contains an optional fo:table-column element, an optional fo:table-header element, a fo:table-body element, an optional fo:table-footer element. Each of these elements may have one or more fo:table-row elements, and fo:table-row also carries one or more fo:table-cell element:

fo:table-and-caption

fo:table

fo:table-header

fo:table-row

fo:table-cell

Car

fo:table-cell

Price

fo:table-body

fo:table-row

fo:table-cell

fo:blockVolvo

fo:table-cell

fo:block$50000

fo:table-row

fo:table-cell

fo:blockSAAB

fo:table-cell

fo:block$48000

The output of the above code is as follows:

Car Price
Volvo $50000
SAAB $48000