XSL-FO-Liste

XSL-FO verwendet den List Block, um Listen zu definieren.

XSL-FO-Listenblock

Es gibt vier XSL-FO-Objekte, die zur Erstellung von Listen verwendet werden können:

fo:list-block
Enthält die gesamte Liste.
fo:list-item
Enthält jedes Element der Liste.
fo:list-item-label
Enthält die Markierungen für das list-item - typischerweise ein <fo:block>, der eine Zahl oder ein Zeichen enthält.
fo:list-item-body
Enthält den Hauptteil oder Inhalt des list-item - typischerweise ein oder mehrere <fo:block>-Objekte.

Ein Beispiel für eine XSL-FO-Liste:

<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>

Ausgabe des folgenden Codes: