|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Background color in table
At 2003-05-27 14:32 +0200, Andreas Byström wrote:
I'm about to make web page that should have a table of names in it. I would like to have different background color on each other ro in the table, example: black white black white... At the point where you are at the parent element of <pack> the pseudo-code would be the following: For each in "pack/service": #this XPath addr selects all service grandchildren <tr> when position() mod 2 = 0 Add black background attribute otherwise Add white background attribute Add content of <tr> element </tr> Note that in the above all service grandchildren are treated as a single set, so the pack boundaries do not interfere with the positioning of the members of the set relative to each other. Also ensure that you add any attributes to a result element *before* you add any content to the row. I hope this helps. ....................... Ken -- Upcoming hands-on courses: (registration still open!) - (XSLT/XPath and/or XSL-FO) North America: June 16-20, 2003 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) ISBN 0-13-065196-6 Definitive XSLT and XPath ISBN 0-13-140374-5 Definitive XSL-FO ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-11-X Practical Formatting Using XSL-FO Member of the XML Guild of Practitioners: http://XMLGuild.info Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








