<xsl:template match="glossentry/glosssee" mode="glossary.as.list">
<xsl:variable name="otherterm" select="@otherterm"/>
- <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+ <xsl:variable name="targets" select="key('id', $otherterm)"/>
<xsl:variable name="target" select="$targets[1]"/>
<fo:block>
<xsl:template match="glossseealso" mode="glossary.as.list">
<xsl:variable name="otherterm" select="@otherterm"/>
- <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+ <xsl:variable name="targets" select="key('id', $otherterm)"/>
<xsl:variable name="target" select="$targets[1]"/>
<xsl:choose>
<xsl:template match="glossentry/glosssee" mode="glossary.as.blocks">
<xsl:variable name="otherterm" select="@otherterm"/>
- <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+ <xsl:variable name="targets" select="key('id', $otherterm)"/>
<xsl:variable name="target" select="$targets[1]"/>
<xsl:variable name="template">
<xsl:template match="glossseealso" mode="glossary.as.blocks">
<xsl:variable name="otherterm" select="@otherterm"/>
- <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+ <xsl:variable name="targets" select="key('id', $otherterm)"/>
<xsl:variable name="target" select="$targets[1]"/>
<xsl:choose>
<xsl:template match="glossentry/glosssee">
<xsl:variable name="otherterm" select="@otherterm"/>
- <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+ <xsl:variable name="targets" select="key('id', $otherterm)"/>
<xsl:variable name="target" select="$targets[1]"/>
<dd>
<xsl:template match="glossseealso">
<xsl:variable name="otherterm" select="@otherterm"/>
- <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+ <xsl:variable name="targets" select="key('id', $otherterm)"/>
<xsl:variable name="target" select="$targets[1]"/>
<xsl:choose>