#636 fo: Indexterm in sectinfo, no entries for index key

open
XSL (1066)
5
2007-01-29
2005-04-11
buddylu
No

I´m using the 1.68.0 Version of the Docbook XSL
Stylesheets and XEP 4.2 build 20050220 to build my PDFs.

When I try to transform valid Docbook-Code like

sect1
sect1info
keywordset
keyword
indexterm
primary
secondary
title

to FO and then to PDF, XEP returns a "no entries for
index key" error. This code works fine

sect1
sect1info
keywordset
keyword
title
indexterm
primary
secondary

Bob`s comment: It appears that *info elements permit
indexterms, but the stylesheets don't output the anchor
that the index entry needs.

Discussion

  • Jirka Kosek

    Jirka Kosek - 2005-04-24
    • assigned_to: nobody --> kosek
     
  • Jirka Kosek

    Jirka Kosek - 2005-04-24

    Logged In: YES
    user_id=189932

    This is now fixed in CVS, but it works only when you switch off
    XEP extensions.

    Fix that utilizes XEP extensions won't be so easy. But there are
    also other things that currently don't work with extensions on --
    namely indexterms with zone attribute.

    But there is easy hack that will enable these things to work in
    XEP. Base your customization layer on profiling stylesheet (fo/
    profile-docbook.xsl) and put following into the customization layer:

    <xsl:key name="itzones" match="indexterm[@zone]"
    use="@zone"/>

    <xsl:template match="*[@id or *[contains(local-name(),'info')]//
    indexterm[not(@zone)]]" mode="profile">
    <xsl:variable name="indexterms" select="*[contains(local-name(
    ),'info')]//indexterm[not(@zone)]"/>
    <xsl:copy>
    <xsl:apply-templates select="@*" mode="profile"/>
    <xsl:apply-templates select="*[contains(name(), 'title')]"
    mode="profile"/>
    <xsl:for-each select="key('itzones', @id)">
    <indexterm class="startofrange" id="ixzone.{generate-id()}">
    <xsl:copy-of select="node()"/>
    </indexterm>
    </xsl:for-each>
    <xsl:for-each select="$indexterms">
    <indexterm class="startofrange" id="ixinfo.{generate-id()}">
    <xsl:copy-of select="node()"/>
    </indexterm>
    </xsl:for-each>
    <xsl:apply-templates select="*[not(contains(name(), 'title'))]"
    mode="profile"/>
    <xsl:for-each select="key('itzones', @id)">
    <indexterm class="endofrange" startref="ixzone.{generate-id(
    )}"/>
    </xsl:for-each>
    <xsl:for-each select="$indexterms">
    <indexterm class="endofrange" startref="ixinfo.{generate-id()}
    "/>
    </xsl:for-each>
    </xsl:copy>
    </xsl:template>

     
  • Michael(tm) Smith

    • summary: Indexterm in sectinfo, no entries for index key --> fo: Indexterm in sectinfo, no entries for index key
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks