- <xsl:template match="dactyl:str | dactyl:type" mode="help-2">
- <span>
- <xsl:if test="self::dactyl:str"><xsl:attribute name="dactyl:highlight">HelpString</xsl:attribute></xsl:if>
- <xsl:if test="self::dactyl:type"><xsl:attribute name="dactyl:highlight">HelpType</xsl:attribute></xsl:if>
+ <xsl:template match="dactyl:type" mode="help-2">
+ <a dactyl:highlight="HelpType">
+ <xsl:choose>
+ <xsl:when test="contains(ancestor::*/@document-tags, concat(' ', ., ' '))">
+ <xsl:attribute name="href">#<xsl:value-of select="."/></xsl:attribute>
+ </xsl:when>
+ <xsl:when test="not(. = 'boolean' or . = 'number' or . = 'string')">
+ <xsl:attribute name="href">dactyl://help-tag/<xsl:value-of select="."/></xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:apply-templates select="@*|node()" mode="help-1"/>
+ </a>
+ </xsl:template>
+ <xsl:template match="dactyl:str" mode="help-2">
+ <span dactyl:highlight="HelpString">