<xsl:template match="xtm:topic">
<!-- <xsl:template match="xtm:topic[xtm:instanceOf/xtm:topicRef/@href='#person']"> -->
<span class="tipContent">
<xsl:attribute name="id">
<xsl:value-of select="@id"/>
</xsl:attribute>
<span class="glossTerm">
<xsl:value-of select="normalize-space(xtm:name/xtm:value)"/>
<xsl:choose>
<xsl:when test="xtm:occurrence/xtm:type/xtm:topicRef/@href = '#date-of-birth'">
<xsl:text> (</xsl:text>
<xsl:value-of select="normalize-space(xtm:occurrence[xtm:type/xtm:topicRef/@href='#date-of-birth']/xtm:resourceData//tei:date/@when)"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="normalize-space(xtm:occurrence[xtm:type/xtm:topicRef/@href='#date-of-death']/xtm:resourceData//tei:date/@when)"/>
<xsl:text>)</xsl:text>
</xsl:when>
<xsl:when test="xtm:occurrence/xtm:type/xtm:topicRef/@href = '#date'">
<xsl:value-of select="concat(' (',normalize-space(xtm:occurrence[xtm:type/xtm:topicRef/@href='#date']/xtm:resourceData//tei:date),')')"/>
</xsl:when>
</xsl:choose>
</span>
<span class="gloss">
<xsl:apply-templates select="xtm:occurrence[xtm:type/xtm:topicRef/@href = '#description']/xtm:resourceData"/>
<xsl:if test="xtm:occurrence[xtm:type/xtm:topicRef/@href = '#article'] or xtm:occurrence[xtm:type/xtm:topicRef/@href = '#collection']">
<div>
<span style="display:block; font-weight:bold;">Resources:</span>
<ul style="margin-left:2em;">
<xsl:apply-templates select="xtm:occurrence[xtm:type/xtm:topicRef/@href = '#article'] | xtm:occurrence[xtm:type/xtm:topicRef/@href = '#collection']"/>
</ul>
</div>
</xsl:if>
</span>
</span>
</xsl:template> |