tags:

views:

20

answers:

1

Hello everybody,

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

+2  A: 

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>
Paul Butcher
Thank you very much.
Duke