<xsl:template match="*[contains(@class,' abbrev-d/abbreviated-form ')]" name="topic.abbreviated-form">
<xsl:variable name="keys" select="@keyref"/>
<xsl:if test="@keyref and document($KEYREF-FILE)//*[@keys=$keys][normalize-space(@href)!='']/@href">
<xsl:variable name="target">
<xsl:value-of select="document($KEYREF-FILE)//*[@keys=$keys][normalize-space(@href)!='']/@href"/>
</xsl:variable>
<xsl:variable name="entry-file" select="concat($WORKDIR, $PATH2PROJ, substring-before($target, '.'), $DITAEXT)"/>
<xsl:variable name="entry-file-contents" select="document($entry-file, /)"/>
<xsl:choose>
<xsl:when test="$entry-file-contents//*[contains(@class,' glossentry/glossentry ')]">
<!-- Fall back to process with normal term rules -->
<xsl:call-template name="topic.term"/>
</xsl:when>
<xsl:otherwise>
<!-- TODO: Throw a warning for incorrect usage of <abbreviated-form> -->
<xsl:apply-templates select="." mode="ditamsg:no-glossentry-for-abbreviated-form">
<xsl:with-param name="keys" select="$keys"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template> |