Daftar XSL-FO

XSL-FO menggunakan blok daftar (List Block) untuk mendefinisikan daftar.

Blok Daftar XSL-FO

Ada empat objek XSL-FO yang dapat digunakan untuk membuat daftar:

fo:list-block
Isi seluruh daftar.
fo:list-item
Isi setiap item dalam daftar.
fo:list-item-label
Isi tanda untuk list-item - biasanya mengandung angka atau karakter <fo:block>.
fo:list-item-body
Isi utama atau konten list-item - biasanya satu atau lebih objek <fo:block>.

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

Output kode di atas: