I want to to some CSS formating based on individual xml item id's. Therefore, I need XSLT to convert the xml id attribute to an html if attribute. XML:
<data><item id="0"><content>bla</content></item><item id="1"><content>bla</content></item></data>
XSLT:
<div id="<xsl:value-of select='@id'>"> <!-- Problem line --> <xsl:apply-templates select="@id"/> <xsl:apply-templates select="content"/></div>
Of course a value-of within a <div> is invalid. I tried using > and <, but to no effect. Is there any way (apart from external scripts) to put the value of my xml id attribute into the html id attribute?I'm also open to another approach if anyone has one...