Latest web development tutorials

XSL-FO list

XSL-FO using <fo: list-block> element to define the list.


XSL-FO block list (List Blocks)

There are four XSL-FO objects used to create a list:

  • fo: list-block (contains the entire list) (contains the whole list)
  • fo: list-item (contains a list of each item) (contains each item in the list)
  • fo: list-item-label (for list-item contains the label - typically contain a number or character of the <fo: block>)
  • fo: list-item-body (contains the contents of the list-item / body - typically, one or more <fo: block> Object)

XSL-FO a list of examples:

<fo:list-block>

<fo:list-item>
<fo:list-item-label>
<fo:block>*</fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block>Volvo</fo:block>
</fo:list-item-body>
</fo:list-item>

<fo:list-item>
<fo:list-item-label>
<fo:block>*</fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block>Saab</fo:block>
</fo:list-item-body>
</fo:list-item>

</fo:list-block>

The output of the code above is as follows:

* Volvo
* Saab