It's not clear why you are having difficulty with this. If you show us your attempt so far, we can perhaps tell you where you are going wrong.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference