How to use XSL-FO Table in XML

In this articles i am going to explain about XSL-FO Table in XML
  • 2247

XSL-FO Tables in XML

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

  • XSL-FO supports an own table structure.

  • XSL-FO Tables structure is neither identical with the traditional CALS table structure nor with the HTML table structure.

  •  XSL-FO Tables is very suitable in order to take both table models as initial point for the typographical implementation.

  • The XSL-FO table concept is especially easy to use for the table setting

 There are nine elements and numerous attributes are available.

  • <fo:table> is the central (the top) and obligatory element for generating a table.

  • <fo:table-body> contains the tabular content of the table which consists of rows and cells

  • <fo:table-column> allows the pre-specification of various characteristics for the columns of the table.

  • <fo:table-and-caption>: If the table has a headline or a caption, this element is the top of the table.

  • <fo:table-caption> incorporates the headline or caption of a table which has top element.

  • <fo:table-row> determines the content and the characteristics of the table rows.

  • <fo:table-cell> determines the content and the characteristics of the table cells.

  • <fo:table-header> generates the header of the table which is automatically repeated if a page break occurs.

  • <fo:table-footer> generates the footer of a table which is automatically repeated if a page break occurs.

For the start a simpe table example

<?xml version="1.0" encoding="utf-8"?>



    <fo:table-column column-width="25mm"/>

    <fo:table-column column-width="25mm"/>




          <fo:block font-weight="bold">Employee No</fo:block>



          <fo:block font-weight="bold">Name</fo:block>

























The output from the code above would be something like this


Employee No






Further Readings

You may also want to read these related articles

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here


© 2020 DotNetHeaven. All rights reserved.