I have a source XML
<Cars>
<Car>
<Make>Fiat</Make>
<Colors>
<Color>RED</Color>
<Color>BLUE</Color>
</Colors>
</Car>
<Car>
<Make>Volvo</Make>
<Colors>
<Color>RED</Color>
<Color>WHITE</Color>
</Colors>
</Car>
<Car>
<Make>Renault</Make>
<Colors>
<Color>BLUE</Color>
<Color>BLACK</Color>
</Colors>
</Car>
</Cars>
which I want to transform into something like
<Cars>
<Detail>
<Name>MakeName</Name>
<Entry>Fiat</Entry>
<Entry>Volvo</Entry>
<Entry>Renault</Entry>
</Detail>
<Detail>
<Name>AvailableColors</Name>
<Entry>RED</Entry>
<Entry>BLUE</Entry>
<Entry>WHITE</Entry>
<Entry>BLACK</Entry>
</Detail>
<Cars>
I am new to XSL, and created one to do half of processing, but I am stuck with the getting of colors as separate elements in target
<xsl:template match="/">
<Cars>
<xsl:apply-templates />
</Cars>
</xsl:template>
<xsl:template match="Cars">
<xsl:apply-templates select="Car" />
</xsl:template>
<xsl:template match="Car">
<Detail>
<Name>MakeName</Name>
<xsl:apply-templates select="Make" />
</Detail>
</xsl:template>
<xsl:template match="Make">
<Entry><xsl:value-of select"text()"/></Entry>
</xsl:template>
I am not able to create XSL for <Name>AvailableColors</Name>
, I am quite new to XSL and any help is greatly appreciated