<xsl:template match="seg[@type='keyword' and not(@prev)]">
<xsl:param name="keyword" as="xs:boolean" tunnel="yes">
<xsl:value-of select="false()"/>
</xsl:param>
<xsl:param name="corresp" tunnel="yes"/>
<span>
<xsl:choose>
<xsl:when test="$keyword = true() and contains(@corresp,$corresp)">
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('#',@xml:id)"/>
</xsl:attribute>
<xsl:apply-templates/>
<xsl:if test="@next">
<xsl:value-of select="' / '"/>
<xsl:call-template name="process-next">
<xsl:with-param name="id">
<xsl:value-of select="substring-after(@next,'#')"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:if test="$highlight-keywords = true()">
<!-- used for encoding checks -->
<xsl:attribute name="style">
<xsl:value-of select="'font-style:italic;'"/>
</xsl:attribute>
<xsl:call-template name="rendition">
<xsl:with-param name="defaultRend">
<xsl:value-of select="substring-after(@corresp,'#')"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:call-template name="atts"/>
<xsl:apply-templates/>
<xsl:if test="@next and $keyword = true()">
<xsl:call-template name="process-next">
<xsl:with-param name="id">
<xsl:value-of select="substring-after(@next,'#')"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</span>
</xsl:template> |