The problem is that all elements have the same attribute names. So I end up having many elements with the same name. What I would like is to have a new element named by combining the element name and the attribute name.
I use XSLT occasionally, but not often. So my knowledge of it and XPath are limited. I've attached the full stylesheet. Any help is appreciated.
Subject:Naming elements Author:justin shell Date:25 Aug 2008 02:52 PM
Ivan,
Thanks. That works perfectly. I had tried something similar to this earlier and it didn't work. I used:
<xsl:element name="{name(..)}{name()}">
The "name(..)" was creating an error (whenever I removed it, the code worked). So I assumed I couldn't write it that way and looked for a different solution. But now that works, too. Not sure what I changed to make it work.
This morning, a friend suggested the following, which also works.