Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
09-24-2008, 07:18 PM #1
- Join Date
- Jul 2008
- Thanked 0 Times in 0 Posts
I'm trying to change the color of the text content within a .xml file through my .xslt file; change it so it displays in red. Text content is within a <brandName registered="Bayer"> & other in <brandName registered="McNeil"> , same .xml file. Aside from the color i would also like to display the "()" around the company name.
I was trying something but it fails.. Never used it before so I'm probably using it the wrong way.
This is what I have for the colour change, and addition of brackets around company name within the .xslt:
<xsl:choose> <xsl:when test="@registered='Aspirin'"> <font color="red"> <xsl:value-of select="@registered='(Bayer)'"/> </font> </xsl:when> <xsl:when test="@registered='Tylenol'"> <font color="red"> <xsl:value-of select="@registered='(McNeil)'"/> </font> </xsl:when> <xsl:otherwise> <font style="bold"> <xsl:value-of select="@registered"/> </font> </xsl:otherwise> </xsl:choose>
Last edited by Alex Vincent; 09-24-2008 at 08:33 PM. Reason: switching to code tags to disable smileys
09-25-2008, 07:14 PM #2