如果我有这个,我该怎么办:
<e1>t1<e2>t2</e2></e1>
我想用 XSLT 翻译:
<c1>t1<c2>t2</c2></c1>
我试过:
<xsl:template match="e1">
<c1>
<xsl:value-of select=".">
<xsl:apply-templates/>
</xsl:value-of>
</c1>
</xsl:template>
<xsl:template match="e2">
<c2>
<xsl:value-of select="."/>
</c2>
</xsl:template>
但是我收到一个错误,因为 value-of 应该为空。