Process the attached test document with
xmllint --noout --valid test.xml # just to be sure
xsltproc -o test.fo 'http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl' test.xml
fop -fo test.fo -pdf test.pdf
Results in an error:
[ERROR] FOP - Exception <org.apache.fop.apps.FOPException: org.apache.fop.fo.ValidationException: Property ID "idm333193685952" (found on "fo:wrapper") previously used; ID values must be unique within a document! (See position 5:40)
It seems to be triggered by the presence of an indexterm. Otherwise, links into variablelists appear to work.
Yes, it is caused by the indexterm. When the xref to the varlistentry is processed, it applies templates to the first <term> element to generate the link text. That should have been processed in no.anchor.mode to turn off duplicate indexterms and nested links. I checked in that fix. You can apply it in your customization layer too:</term>
<xsl:template match="varlistentry/term" mode="xref-to">
<xsl:param name="verbose" select="1">
</xsl:param></xsl:template>
<xsl:apply-templates mode="no.anchor.mode">
</xsl:apply-templates>
Thanks, that worked.