XSLT - Transform the value of an attribute to a tagname
I have been looking for a while and I do not understand how I can do something like this:
From
<computer type="laptop">
....
</computer>
To
<laptop>
....
In fact as you can see I want to transform the value of an attribute to a tagname, I开发者_运维百科 do not even know if it is possible.
Thank you
Use the xsl:element
element. With this, you can create an element with any name you choose.
e.g.
<xsl:element name="{@type}">
...
</xsl:element>
精彩评论