-->
</xsl:template>
+<xsl:template match="*" mode="fop1.foxdest">
+ <xsl:apply-templates select="*" mode="fop1.foxdest"/>
+</xsl:template>
+
+<xsl:template match="set|book|part|reference|
+ preface|chapter|appendix|article
+ |glossary|bibliography|index|setindex
+ |refentry
+ |sect1|sect2|sect3|sect4|sect5|section"
+ mode="fop1.foxdest">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+ <xsl:variable name="bookmark-label">
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </xsl:variable>
+ <!--xsl:if test="$id != ''">
+ <fox:destination internal-destination="{$id}"/>
+ </xsl:if-->
+
+ <!-- Put the root element bookmark at the same level as its children -->
+ <!-- If the object is a set or book, generate a bookmark for the toc -->
+
+ <xsl:choose>
+ <xsl:when test="self::index and $generate.index = 0"/>
+ <xsl:when test="parent::*">
+ <fox:destination internal-destination="{$id}"/>
+ <xsl:apply-templates select="*" mode="fop1.foxdest"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <fox:destination internal-destination="{$id}"/>
+ <xsl:apply-templates select="*" mode="fop1.foxdest"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
<!-- Metadata support ("Document Properties" in Adobe Reader) -->
<xsl:template name="fop1-document-information">
<xsl:variable name="authors" select="(//author|//editor|//corpauthor|//authorgroup)[1]"/>
</xsl:when>
<xsl:when test="$href != ''">
<xsl:choose>
+ <xsl:when test="$fop1.extensions != 0">
+ <xsl:variable name="mybeg" select="substring-before($href,'#')"/>
+ <xsl:variable name="myend" select="substring-after($href,'#')"/>
+ <fo:basic-link external-destination="url({concat($mybeg,'#dest=',$myend)})"
+ xsl:use-attribute-sets="olink.properties">
+ <xsl:copy-of select="$hottext"/>
+ </fo:basic-link>
+ <xsl:copy-of select="$olink.page.citation"/>
+ <xsl:copy-of select="$olink.docname.citation"/>
+ </xsl:when>
<xsl:when test="$xep.extensions != 0">
<fo:basic-link external-destination="url({$href})"
xsl:use-attribute-sets="olink.properties">