docbook-apps

Re: [docbook-apps] indexterm inside part/title and fo output

  • 1.  Re: [docbook-apps] indexterm inside part/title and fo output

    Posted 06-02-2010 00:09
    Hi,
    This appears to be a bug in the template named 'division.title' in fo/division.xsl.
    When it formats the title, it fails to include the marker for the indexterm. I'll
    fix it in the SVN repository for the next release. This is the change I'm making.

    Change:

    <xsl:variable name="title">
    <xsl:apply-templates select="$node" mode="object.title.markup"/>
    </xsl:variable>

    To:

    <xsl:variable name="title">
    <xsl:apply-templates select="$node" mode="object.title.markup">
    <xsl:with-param name="allow-anchors" select="1"/>
    </xsl:apply-templates>
    </xsl:variable>

    When 'allow-anchors' is set to zero (the default), then any indexterms are ignored.
    That's because a title can be processed with mode="object.title.markup" in many
    contexts, but only one context should have the indexterm markers, and that one should
    have the allow-anchors parameter explicitly set to 1.

    Thanks for the bug report.

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net


    ----- Original Message -----
    From: "Giuseppe Bonelli" <peppo.bonelli@gmail.com>
    To: <docbook-apps@lists.oasis-open.org>
    Sent: Tuesday, June 01, 2010 4:08 PM
    Subject: [docbook-apps] indexterm inside part/title and fo output


    > Hi,
    > I have a document where an indexterm appears inside a book/part/title.
    > Apparently, the part/title element does not get its id during the
    > index generation and in the fo generated index the relevant
    > <fo:page-number-citation ref-id="d0e10266"/> points to an undefined
    > id.
    >
    > If I move the indexterm inside a chapter/title everything works as expected.
    >
    > Any idea on the template controlling the index id generation on part/title ?
    >
    > Thanks in advance,
    >
    > __peppo
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >
    >