I am using XSL FO list block to show bullet points. Is it possible to change list-style-type to show square (or other shape)? In HTML, it is <ul style="list-style-type:square;">
Code:
<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>
Put the character that you want in place of the *
:
<fo:list-item-label>
<fo:block color="blue" font-weight="bold" font-size="1.3em">✪</fo:block>
</fo:list-item-label>
This looks like a lot of work compared to <ul style="list-style-type:square;">
, but:
relative-align
: https://www.w3.org/TR/xsl11/#relative-align), and position of the list item label (and, as above, you typically only need to set that up once)position()
in your XSLTxsl:number
makes it easy to generate hierarchical numbers to use in list item labels. (If you were using AH Formatter, you'd also be able to use a bunch of predefined counter styles: https://www.antenna.co.jp/AHF/help/en/ahf-ext.html#axf.counter-style.)