Created
August 25, 2017 07:28
-
-
Save loonix/366df03d141a8935b24cdb28f32a1f3c to your computer and use it in GitHub Desktop.
Table of Contents XSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:template name="genTOC"> | |
<fo:block break-after="page"> | |
<fo:block space-after="5mm">Table of Contents</fo:block> | |
<xsl:for-each select="//PATH"> | |
<fo:block text-align-last="justify"> | |
<xsl:value-of select="./Name" />: | |
<fo:basic-link internal-destination="{generate-id(.)}"> | |
<fo:leader leader-pattern="dots" leader-pattern-width="2mm" /> | |
<fo:page-number-citation ref-id="{generate-id(.)}" /> | |
</fo:basic-link> | |
</fo:block> | |
</xsl:for-each> | |
</fo:block> | |
</xsl:template> | |
<xsl:template match="//TEMPLATEHERE"> | |
<fo:block page-break-after="always"> | |
<fo:block >Page</fo:block> | |
<xsl:for-each select="./PATH"> | |
<fo:inline id="{generate-id()}"></fo:inline> | |
<!-- ... --> | |
</xsl:for-each> | |
</fo:block> | |
</xsl:template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment