在使用xsl转换xml文档的时候,存在如下的可能:
1.将source element转化为target element
2.将source element转化为target element attribute
3.将source element attribute转化为target element
4.将source element attribute转化为target element attribute

Example for 2 and 3
XML (6) xsl范例XML (6) xsl范例XML (6) xsl范例


Example for 4
<xsl:param name="avail">
<xsl:value-of select="@available"/>
</xsl:param>
<building available="{$avail}"/>

在转换的时候,我们大部分时候需要获取source element的内容或者属性,那如何获取元素的名称呢?

相关文章: