Re: [docbook-apps] Which link?

From
Dave Pawson <>
Date
2011-02-10T11:06:43+00:00
ID
20110210105946.35b8f337@marge3
Thread
Re: [docbook-apps] Which link?
Bob, is this worth an rfe? Let people link back to a footnote reference?

On Thu, 10 Feb 2011 10:30:19 +0000
Dave Pawson <> wrote:

> 
> 
> db5, xsl-fo output. Renderx xep formatter
> 
> I want an internal link to an element with an id, but no content.
> 
> target is
> <footnote xml:id='x'><para> .....

Resolved. 
Custimized footnotes.xsl
Just added the id to the fo:inline,
since fo:footnote is an invalid (?????) target for a link, which is odd.



<xsl:template match="d:footnote">
  <xsl:choose>
    <xsl:when test="ancestor::d:table or ancestor::d:informaltable">
      <xsl:call-template name="format.footnote.mark">
        <xsl:with-param name="mark">
          <xsl:apply-templates select="." mode="footnote.number"/>
        </xsl:with-param>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <fo:footnote >
        <fo:inline id="{@xml:id}">
          <xsl:call-template name="format.footnote.mark">
            <xsl:with-param name="mark">
              <xsl:apply-templates select="." mode="footnote.number"/>
            </xsl:with-param>
          </xsl:call-template>
        </fo:inline>
        <fo:footnote-body xsl:use-attribute-sets="footnote.properties">
          <xsl:apply-templates/>
        </fo:footnote-body>
      </fo:footnote>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>


Built collated source has
 <db:link  xlink:href="#{@xml:id}">[<xsl:value-of
select="$fnnumber"/>]</db:link>

Sorry to waste bandwidth.

Takes two ends to make a link.




-- 

regards 

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk