XML.com has an article on using loops in XSL. (I’m just storing a pointer here, I have a great application for XSL in mind at work, and won’t have time to get started on it for at least a month.)