This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Yet Another Grouping Question
- To: xsl-list at mulberrytech dot com
- Subject: Yet Another Grouping Question
- From: Kai dot Grossjohann at CS dot Uni-Dortmund dot DE (Kai Großjohann)
- Date: 13 Mar 2000 16:09:12 +0100
- Reply-To: xsl-list at mulberrytech dot com
Input XML fragment:
<list>
<item><prog>bar</prog><version>2</version></item>
<item><prog>bar</prog><version>3</version></item>
<item><prog>foo</prog><version>1.2</version></item>
<item><prog>foo</prog><version>1.3</version></item>
<item><prog>xyzzy</prog><version>1.0</version></item>
</list>
Desired output:
HTML table with one row per item, sorted by program name. All `bar'
lines have green background, all `foo' lines have yellow background,
all `xyzzy' lines have green background, and so on.
I.e.: change background color when prog element changes.
Thanks to the FAQ http://freespace.virgin.net/b.pawson/xsl I think I
know how to create output when the prog element changes, but how to
toggle between green and yellow background? This would mean I need a
variable which contains the current background color, but since
variable assignment is not possible in XSLT...
tia,
kai
--
~/.signature: No such file or directory
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list