Hi,
I have an XML:
<A>
<B>
<C>a</C>
</B>
<B>
<C>b</C>
</B>
<B>
<C>c</C>
</B>
</A>
and I need the output as
<X name="a">
<Y name="b">
<Z name ="c"/>
</Y>
</X>
i don't know how to write the XSL for it, tried few things but couldn't get the solution.
Tried XSL-
<xsl:variable name="i">
<xsl:value-of select="A/B/C"/>
</xsl:variable>
<X name={$i}>
<xsl:variable name="j">
<xsl:value-of select="A/B/C"/>
</xsl:variable>
<Y name={$j}>
<xsl:variable name="k">
<xsl:value-of select="A/B/C"/>
</xsl:variable>
<Z name={$k}/>
</Y>
</X>
it gives output as
<X name="a">
<Y name="a">
<Z name ="a"/>
</Y>
</X>
Please advise