I am having an issue with links in a two column PDF I generate with FOP. I get the following error when I run the fo file through FOP:


WARNING: 1 link target could not be fully resolved and now point to the top of the page or is dysfunctional.


This happens when the target of the link is in a block with span="all", or if the block is on the final page of the PDF. My test XML has a link to another block, does not have span="all", and the link works.


I have generated a one column PDF of the same XML and all the links resolve correctly. The XSL template that generates the link is the same between the two stylesheets, so I am confident that the XSL is correct. Has anyone else had issues with this, and was/is there a resolution?


Example template for a link to a paragraph:



<xsl:template match="internalRef[@internalRefTargetType='para']">
<xsl:variable name="refId" select="@internalRefId"/>
<fo:inline>
<fo:basic-link internal-destination="{$refId}" color="blue"
text-decoration="underline">
<xsl:text>Para </xsl:text>
<xsl:apply-templates select="//levelledPara[@id=$refId]" mode="nbr"/>
</fo:basic-link>
</fo:inline>
</xsl:template>

<xsl:template match="levelledPara" mode="nbr">
<xsl:variable name="origNbr">
<xsl:number level="multiple" format="1.1.1.1.1"/>
</xsl:variable>
<xsl:value-of select="$origNbr"/>
</xsl:template>

No comments:

Post a Comment