Table Row Color Change upon change in column, not every other row

b_dawg

New Member
Using XSLT, how can I alternate (2 colors) the row colors in the table every time the value in the \[code\]id\[/code\] element changes. Alternating every other row is simple. Unfortunately when \[code\]for-each\[/code\] expires, the variable goes out of scope. Here is my xml:\[code\]<guests> <guest> <name>bob</name> <id>1</id> </guest> <guest> <name>tom</name> <id>2</id> </guest> <guest> <name>peter</name> <id>2</id> </guest> <guest> <name>jim</name> <id>4</id> </guest> <guest> <name>jake</name> <id>3</id> </guest> <guest> <name>dave</name> <id>3</id> </guest> <guest> <name>steve</name> <id>5</id> </guest> <guest> <name>joe</name> <id>5</id> </guest> <guest> <name>............</name> <id>...........</id> </guest></guests>\[/code\]
 
Back
Top