Styling every other repeat item differently

A common task when presenting repeated data is to style alternating
lines differently.

Does anybody have a good way to do this?  It would seem that CSS
counters ought to be able to do it, but even so they don't seem to be
popular implementation items.

I've developed a way that works in XForms, but it relies on duplicated
groups and an attribute specifying the item number, because I am unable
to figure out how to find the current item number in a repeat.

Can anybody do better than the attached file?

Leigh.

Received on Thursday, 18 January 2007 00:30:40 UTC