<xsl:template match="span[ @class = ’mathvariant-bold’ ]" >
<xsl:copy>
<xsl:apply-templates select="@*" />
<xsl:variable name="content">
<xsl:apply-templates select="*" mode="content" />
</xsl:variable>
<xsl:choose>
<xsl:when test="
string-length( normalize-space( $content )) = 1
" >
<span class="begin-end" title="speech-extra" >
<xsl:text> bold </xsl:text>
</span>
<xsl:apply-templates select="*|text()|comment()" />
</xsl:when>
<xsl:otherwise>
<span class="begin-end" title="speech-extra" >
<xsl:text> begin bold </xsl:text>
</span>
<xsl:apply-templates select="*|text()|comment()" />
<span class="begin-end" title="speech-extra" >
<xsl:text> end bold </xsl:text>
</span>
</xsl:otherwise>
</xsl:choose>
</xsl:copy>
</xsl:template>
-_-_-