Reputation: 457
How to Concat Parent tag with Child tag name in XSLT
Currently I am able to get parent and child node values but i don't know how to join them as single value
<xsl:value-of select="name()"/> //gives child name
<xsl:value-of select="name(..)"/> //gives parent name
I want to do something like <xsl:value-of select="concat(name(..),name())"/>
so result would be Parent_Child
Upvotes: 0
Views: 179
Reputation: 1695
If you want to create a new element name based on that
<xsl:element name="{concat(name(..),'_',name(.))}"/>
Upvotes: 0