Please try to be more courteous in your language.
My response was correct, but it did not try to be a complete stylesheet. You only told me part of what you wanted to do, so I gave you the part of the code needed to do that. Getting the rest right is up to you.
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference