【发布时间】:2014-03-18 14:39:35
【问题描述】:
我有这个:
<tab:column align="left" class="notdecorated" label="lab">
<b>General Information</b>
</tab:column>
我想得到这个:
<column align="left" class="notdecorated" label="lab">
<b>General Information</b>
<column>
这是我的 -incomplete- xslt 转换器:
<xsl:template match="tab:column">
<column>
<xsl:apply-templates />
</column>
</xsl:template>
它忽略“标签”部分但不复制属性。所以我像这样丰富了它:
<xsl:template match="tab:column">
<column>
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
<xsl:apply-templates />
</column>
</xsl:template>
但这也不起作用。 那么如何在复制属性的同时更改元素名称呢?
【问题讨论】: