Reputation: 1
I have an XML like this:
<dataroot>
<element>
<color>#FF0FFF</color>
</element>
<element>
<color>#FF0000</color>
</element>
</dataroot>
And I need to put inside this tag on html:
<xsl:for-each select="dataroot/element">
<tr style="background-color:{.};"> <xsl:value-of select="color" />
</tr>
</xsl:for-each>
But it does not work. I tried to use it as attribute also but it did not work. Can anybody help me?
Upvotes: 0
Views: 555
Reputation: 78135
<xsl:for-each select="dataroot/element">
<tr style="background-color:{color};"></tr>
</xsl:for-each>
Upvotes: 1