1
以下XSLT模板使用foo element
更新bar
屬性。在不指定屬性名稱兩次的情況下替換XSLT屬性值
<xsl:template match='foo/@bar'>
<xsl:attribute name='bar'>New value</xsl:attribute>
</xsl:template>
是否可以刪除重複的欄名稱?
以下XSLT模板使用foo element
更新bar
屬性。在不指定屬性名稱兩次的情況下替換XSLT屬性值
<xsl:template match='foo/@bar'>
<xsl:attribute name='bar'>New value</xsl:attribute>
</xsl:template>
是否可以刪除重複的欄名稱?
使用name()
函數動態輸出bar
屬性名稱。
<xsl:template match='foo/@bar'>
<xsl:attribute name='{name()}'>New value</xsl:attribute>
</xsl:template>