Please try to describe your requirements more clearly. I have no idea what your input really looks like, and I have no idea what you want to go in each of the four columns of your table.
Please also try to describe how you have attempted to solve the problem and why you are having difficulties.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference