XSL-FO Lists

XSL-FO uses List Block to define lists.

XSL-FO List Block

There are four XSL-FO objects that can be used to create lists:

fo:list-block
Contains the entire list.
fo:list-item
Contains each item in the list.
fo:list-item-label
Contains the tags used for list-item - typically, containing a number or character <fo:block>.
fo:list-item-body
Contains the main body or content of list-item - typically, one or more <fo:block> objects.

An example of an XSL-FO list:

<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 above code: