问题
i have XML with chapters and there can be any number of chapters inside one chapter. how to create a Bookmark for the same.:
1. Chapter 1
1.1 chapter 1.1
1.1.1 Chapter 1.1.1
1.2 Chapter 1.2
2.Chapter 2
2.1 Chapter 2.1
2.2 Chapter 2.2
i tried using:
<fo:bookmark-tree>
<fo:bookmark
internal-destination="toc">
<fo:bookmark-title>
Table Of Contents
</fo:bookmark-title>
<fo:bookmark
internal-destination="CHAPTER/LONG-NAME"
starting-state="show">
<fo:bookmark-title>
<xsl:for-each select="//CHAPTER">
<xsl:number format="1. " count="CHAPTER" level=""multiple/>
<xsl:value-of select="LONG-NAME"/>
</xsl:for-each>
<xsl:apply-templates
select="CHAPTER/LONG-NAME"/>
</fo:bookmark-title>`
</fo:bookmark>
</fo:bookmark>
</fo:bookmark-tree>
but i am able to achieve two sub-bookmarks: one with Table of Contents as title second with "All the chapter's long name" as title.
how to repeat fo:bookmark tag for each and every chapter??
来源:https://stackoverflow.com/questions/16170937/how-to-create-bookmarks-in-xsl-fo