I have the following snippet of XSL:
It should be something like...
(not tested)
See w3schools (always a good reference BTW)