我有以下标记。
<para><span class="bidi"/><span class="ind"/>1</para>
我正在努力实现这一目标...
<para><span style="direction:rtl; text-indent:10pt;">1</span></para>
然而,我得到这个...
<para><span style="direction:rtl">1</span><span style="text-indent:10pt">1</span></para>
这是我的 XSLT。
<xsl:template match="span" name="spans">
<span>
<xsl:attribute name="style">
<xsl:choose>
<xsl:when test="@class eq 'bidi'">
<xsl:text>direction:rtl</xsl:text>
</xsl:when>
<xsl:when test="@class eq 'ind'">
<xsl:text>text-indent:10pt;</xsl:text>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:attribute>
<xsl:apply-templates/>
</span>
</xsl:template>
如何将多个跨度与其所有类属性值合并为 1?