<xsl:variable name="key" select="&primary;"/>
<xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
<dt>
- <xsl:call-template name="anchor">
- <xsl:with-param name="node" select="primary"/>
- </xsl:call-template>
+ <xsl:for-each select="$refs/primary">
+ <xsl:if test="@id or @xml:id">
+ <a name="{(@id|@xml:id)[1]}"/>
+ </xsl:if>
+ </xsl:for-each>
<xsl:value-of select="primary"/>
<xsl:choose>
<xsl:when test="$index.links.to.section = 1">
<xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
<xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
<dt>
- <xsl:call-template name="anchor">
- <xsl:with-param name="node" select="secondary"/>
- </xsl:call-template>
+ <xsl:for-each select="$refs/secondary">
+ <xsl:if test="@id or @xml:id">
+ <a name="{(@id|@xml:id)[1]}"/>
+ </xsl:if>
+ </xsl:for-each>
<xsl:value-of select="secondary"/>
<xsl:choose>
<xsl:when test="$index.links.to.section = 1">
<xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
<xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/>
<dt>
- <xsl:call-template name="anchor">
- <xsl:with-param name="node" select="tertiary"/>
- </xsl:call-template>
+ <xsl:for-each select="$refs/tertiary">
+ <xsl:if test="@id or @xml:id">
+ <a name="{(@id|@xml:id)[1]}"/>
+ </xsl:if>
+ </xsl:for-each>
<xsl:value-of select="tertiary"/>
<xsl:choose>
<xsl:when test="$index.links.to.section = 1">