By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,197 Members | 1,165 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,197 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a

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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.