How to create Bookmarks in XSL-FO?

早过忘川 提交于 2019-12-24 12:40:11

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!