开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜