docbook-apps

  • 1.  Re: [docbook-apps] endnotes section in ePub

    Posted 07-19-2011 21:39
    Hi Jason,
    What you are seeing is the difference between an href generated for single-file HTML
    output (#id only) and chunked HTML output (filename.html#id). There is a template
    named "href.target" in html/html.xsl that handles the single-file version, and another
    template with that name in chunk-common.xsl that handled the chunked version. Through
    import precedence, the latter is to be used for chunked output.

    You seem to be getting the first version, so I think there is an issue with import
    precedence in the set up of your customization.

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net





  • 2.  RE: [docbook-apps] endnotes section in ePub

    Posted 07-20-2011 16:11
    For posterity, I did get the whole thing working. To get the return link working, I copied into my customization layer the template:

    <xsl:template match="*" mode="footnote.body.number">.

    I added the variable:

    <xsl:variable name="target.href">
    <xsl:call-template name="href.target">
    <xsl:with-param name="object" select="ancestor::d:footnote"/>
    </xsl:call-template>
    </xsl:variable>

    And I output the variable by outputting inside the HREF variable

    <xsl:variable name="href">

    <xsl:value-of select="substring-before($target.href, '#')"/>

    <xsl:text>#</xsl:text>
    <xsl:call-template name="object.id">
    <xsl:with-param name="object" select="ancestor::d:footnote"/>
    </xsl:call-template>
    </xsl:variable>

    I've just started testing, but this seems to generate the filename before the #ID in the href, allowing me to jump across documents with my endnotes link.

    Thanks again for all the help.

    jz