473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Setting row color to be based on content in cells in rows in XML

What would be the best software, and also what would be the best
programming language based solution, to solve the following problem:

I have an XML data set I reference with the usual HTML table. What I
want to do, is to give rows in the data that contain, say the word X in
column 2 a red background color, while I give rows in the data that
contain, the word Y in column 2 a green background color.

More ambitiously, I would like to set rows that contain X in column 2
to have the font style, text color, text size, etc and also the
background color determined by one CSS id, while I set the rows that
contain Y in column 2 to have font style text color text size etc and
background color determined by another CSS id.

Mar 24 '06 #1
2 1318

vi*******@rcn.com wrote:
What would be the best software, and also what would be the best
programming language based solution, to solve the following problem:


Something you already know reasonably well, or something that's worth
learning as a long term goal.

XSLT could certainly solve this problem for you (Try Michael Kay's
book if you need a tutorial).

Mar 24 '06 #2
vi*******@rcn.com wrote:
What would be the best software, and also what would be the best
programming language based solution, to solve the following problem:

I have an XML data set I reference with the usual HTML table. What I
want to do, is to give rows in the data that contain, say the word X in
column 2 a red background color, while I give rows in the data that
contain, the word Y in column 2 a green background color.

More ambitiously, I would like to set rows that contain X in column 2
to have the font style, text color, text size, etc and also the
background color determined by one CSS id, while I set the rows that
contain Y in column 2 to have font style text color text size etc and
background color determined by another CSS id.


See the XSL FAQ
http://www.dpawson.co.uk/xsl/sect2/N961.html

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Mar 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

31
by: Arthur Shapiro | last post by:
I'm the webmaster for a recreational organization. As part of one page of the site, I have an HTML "Calendar at a Glance" of the organization's events for the month. It's a simple table of a...
3
by: cpt | last post by:
I read that if one uses "table-layout:fixed" then table rendering is speeded by setting row height. All my rows are 285 px high. 1) Is this true? 2) If true, how does one set row-height for the...
0
by: Shafia | last post by:
Hi, I have a TreeView and a GridView in my UI. On a "CheckChanged" event of tree, I do the following GridView1.Rows.Cells.Text = e.Node.Text; or rather ...
2
by: vincemoon | last post by:
What would be the best software, and also what would be the best programming language based solution, to solve the following problem: I have an XML data set I reference with the usual HTML table....
0
by: John | last post by:
Hi, I have set a DataGridViewComboBoxColumn for a complex object type, and set the DisplayMember and ValueMember to members of the object type. My problem is how to programmatically set the cell...
2
by: Jacksm | last post by:
How can I align an asp:table columns with gridview columns (the widths)? I have tried setting table.column(0).width = gridview.column(0).width at page_load but it doesn't work. Thanks in advance
9
by: sitko | last post by:
Hi, I have an Order tracking spreadsheet that I need help with. I have a 2 worksheets "Open", and "Closed". I have entries on the "Open" sheet which may or may not be grouped together. I've...
7
by: bobk | last post by:
My apologies upfront for what I am sure is a newbie question, but I have been unable to find an answer via search. I am a VB6 programmer trying to write programs in VB 2008 Express. I have an...
2
Claus Mygind
by: Claus Mygind | last post by:
I have an array of objects (a hash table). My section of code, the "for in" loop (lines 18 to 41) does not execute at full speed. But if I put in an alert box (line 13) to stop program execution...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.