Good day,
I am working on presentation to convert it to pdf from xml where I am using these technologies:
And in my XSL-FO file I need to have a presentation slide containing numbered list of specific items. Only thing I found is only common list as shown above this paragraph. Here is xsl-fo documentation for lists: https://www.alt-soft.com/tutorial/xslfo_tutorial/xsl-fo_list.html
Here is my code:
<fo:list-block padding="4pt" margin-left="10mm" margin-top="4mm">
<xsl:for-each select="//*[starts-with(name(), 'slide_')]">
<xsl:if test="not(position()=1)">
<fo:list-item margin-left="13mm" margin-top="8mm" margin-right="5mm" font-family="Times, 'Times New Roman', serif" font-size="15pt">
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block margin-left="10mm">
<xsl:value-of select="title"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:if>
</xsl:for-each>
</fo:list-block>
This code will generate common dot list of all slide titles, but I am unable to make an ordered list with numbers like ol in HTML. I found only solution that not work for me where these list elements are somehow nested. I tried it but during compilation it always fail. Here is link to that code(page 8,9): https://www.w3.org/Style/XSL/TestSuite/contrib/FOP/list.pdf
This online site can help you to find solution for me, to test it online: http://www.utilities-online.info/foprender/#.WRLOAYh97cs
Is there some solution how this can be done please? Thanks in advance for your reply.
You need to put a number in place of the •
in each fo:list-item-label
.
You can generate the numbers from the structure of your source XML by using xsl:number
. See https://www.w3.org/TR/xslt#number for the XSLT 1.0 definition and some simple examples.