The usual approach to combine match patterns is
<xsl:template match="word[@italic = 'y'] | word[@bold = 'y'] | word[@underline = 'y']">
As for transforming the attributes, can't you just use
<xsl:template match="word">
<p>
<xsl:apply-templates select="@* | node()"/>
</p>
</xsl:template>
plus templates for the attributes e.g.
<xsl:template match="word/@italic[. = 'y']">
<xsl:attribute name="i">yes</xsl:attribute>
</xsl:template>
and so on?
Or perhaps
<xsl:template match="word/@italic[. = 'y'] | word/@bold[. = 'y'] | word/@underline[. = 'y']">
<xsl:attribute name="{substring(local-name(), 1, 1)}">yes</xsl:attribute>
</xsl:template>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…