Any one Comfortable with XML and XSLT here: In my XMLl I am trying to color two different "p" tags with different attributes using XSLT below:
<xsl:template match="p">
<xsl:choose>
<xsl: when test="p/@color='red'"><span style="color:#00ff00"><xsl:value-of select="p"/></span></xsl:when>
<xsl: when test="p/@color='green'"> <span style="color:#ff0000"> <xsl:value-of select="p"/></span></xsl:when>
<xsl: otherwise><xsl:value-of select="p"/></xsl:otherwise>
</xsl:choose>
</xsl:template>
XML looks like this
<html>
<body>
<p color="red">Last paragraph incorrect</p>
<p>A Second paragraph</p>
<p color="green">The First paragraph</p>
<p color="green">Anthony Gonsalwes</p>
</body>
<body>
<l color="green"> kumarswamy</l>
</body>
</html>