OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] [PDF] Bookmarks - add index groups


Hi,
The process of generating bookmarks is specific to each FO processor.  For XEP, the 
document is processed in mode="xep.outline", and those templates are in fo/xep.xsl. 
The main template handles all the elements, but you could create a new template in 
your customization to match on just <index> and do something different.  The basic 
template for an XEP bookmark is:

      <rx:bookmark internal-destination="{$id}">
        <rx:bookmark-label>
          <xsl:value-of select="normalize-space($bookmark-label)"/>
        </rx:bookmark-label>
        <xsl:apply-templates select="*" mode="xep.outline"/>
      </rx:bookmark>

Note that it does xsl:apply-templates inside the rx:bookmark to nest any child 
elements.  That gives the xep outline the same nested structure as the document.  If 
you were to create a new template matching on index:

      <xsl:template match="index" mode="xep.outline">
        <rx:bookmark-label>
          <xsl:value-of select="normalize-space($bookmark-label)"/>
        </rx:bookmark-label>
        [generate the nested rx:bookmark elements here for the index sections]
      </rx:bookmark>

The tricky part is determining which letters actually have entries in the current 
index, so you don't create bookmark links to non-existant index sections.  I don't 
have a quick solution for that one.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "honyk" <j.tosovsky@email.cz>
To: <docbook-apps@lists.oasis-open.org>
Sent: Monday, August 30, 2010 10:22 AM
Subject: [docbook-apps] [PDF] Bookmarks - add index groups


> Hello Everyone,
>
> there is a quite huge index in my document so I'd like to build a more
> precise navigation. My idea is to add all the generated index groups (*, A,
> B etc. - if present) into bookmarks with the direct link to the beginning of
> each group.
>
> While there is no problem to add anchors to the group title in the final
> index, I am completely lost in method, how to create corresponding bookmarks
> (for XEP in my case) as these groups are created virtually on the fly and
> they aren't available in the phase of generating bookmarks.
>
> Does anybody have any idea? Thanks in advance for any hint.
>
> Regards,
>
> Jan
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]