473,491 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

XSL doubt!

30 New Member
Hi Frenz,

am working with xsl, and with a specific criteria, am trying to change the font color of the date value, as it can be seen from the code.
Its a table with many rows. Instead of changing the color of the date value in that particular td of the table, i want to change the background color of tht td for tht date. please help me how to modify my code. its urgent.

[html]<xsl:template match="//row" >
<xsl:variable name='JoinCntFlag' select="//row[@Element='CountFlag' and @Date=$TDate]/@Cnt"/>
<tr>
<td class="text1" align="left" style="background-color: gainsbro">
<a class="link1">
<xsl:attribute name="href" >javascript:OpenVisitType('<xsl:value-of select="@Date" />')
</xsl:attribute>
<xsl:choose>
<xsl:when test ="$JoinCntFlag = 1" >
<font color="brown"><xsl:value-of select="@Date"/> </font>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@Date"/>
</xsl:otherwise>
</xsl:choose>
</a>
</td>
<td>.........</td>
</tr>
....
</xsl:template>[/html]

Thanks,
jai
Apr 25 '07 #1
1 1187
dorinbogdan
839 Recognized Expert Contributor
Try something like this:
[html]....
<td class="text1" align="left">
<xsl:attribute name="style">
<xsl:choose>
<xsl:when test ="$JoinCntFlag = 1" >
'background-color:red'
</xsl:when>
<xsl:otherwise>
'background-color:blue'
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<a class="link1">
<xsl:attribute name="href">javascript:OpenVisitType('<xsl:value-of select="@Date" />')
</xsl:attribute>
<xsl:value-of select="@Date"/>
</a>
</td>
....[/html]
Apr 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1985
by: Guilherme Pinto | last post by:
Hello. I am reading the book written by Bjarne Stroustrup called " The C++ Programming Language - Special Edition" and had a doubt which a think is really important to distinguish between the...
138
5098
by: ambika | last post by:
Hello, Am not very good with pointers in C,but I have a small doubt about the way these pointers work.. We all know that in an array say x,x is gonna point to the first element in that...
4
2674
by: dam_fool_2003 | last post by:
I am just a beginner in tree data – struct. I have this little doubt. Left node ‘weights' lesser than the right one. I have seen, so far it is algorithm implementations. But why not vice-versa that...
20
1621
by: maadhuu | last post by:
firstly, i am thankful to all those who answered the 1st set of doubts. And i am not yet enlightened to that extent , coz ' i keep getting doubts. is the following defined in the language ?? int...
3
1314
by: SMG | last post by:
Hi All, It might be a silly doubt, but it is a doubt.... I am using form authentication for my website, now my web application is gonna be deployed on two web servers with Load Balancing...
77
3608
by: muttaa | last post by:
Hello all, My doubt is going to be so primitive that i ask you all to forgive me beforehand.... Here's the code snippet: int main() { int x=5;
11
2078
by: Bob Nelson | last post by:
I don't remember seeing the term ``doubt'' used much in c.l.c. back in the 90's. When did this word become nearly synonymous with ``question'' or ``query'' and does it have static duration?
122
4149
by: ivan | last post by:
hi all, if I have: if(A && B || C) which operation gets executed first? If I remeber well should be &&, am I correct? thanks
5
1696
by: Paulo | last post by:
Hi, I have a RadioButtonList and I need to do some verifications on a "OnChange" event on client... because on classic asp/html I just add a "onChange" event on <input type="radio" onChange="">,...
0
6978
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
280
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.