This isn't a specification that anyone can work from. There is no obvious relationship between your input and your output. Where do the names Junior, Sorter, and Pearson come from, for example?
It's also useful to tell us how you tried to solve this problem and where you got stuck. If I'm going to help you solve it, I want to know which parts of the problem you are capable of tackling on your own and which parts you need help with.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference