XSL-FO Listes
XSL-FO utilise l'élément <fo:list-block> pour définir des listes.
Blocs de liste XSL-FO
Il existe quatre objets XSL-FO utilisés pour créer des listes :
- fo:list-block (contient toute la liste) (contient toute la liste)
- fo:list-item (contient chaque élément de la liste) (contient chaque élément de la liste)
- fo:list-item-label (contient l'étiquette de l'élément de liste - typiquement, un <fo:block> contenant un nombre ou un caractère)
- fo:list-item-body (contient le contenu/corps de l'élément de liste - typiquement, un ou plusieurs objets <fo:block>)
Un exemple de liste XSL-FO :
<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>
<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>
La sortie du code ci-dessus est la suivante :
|
* Volvo * Saab |
Autres extensions