This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
So you want to change your badly designed XML document into something more useful, such as this:
I don't think there is a way of using XSLT to do this - since you have no data in your personname element which links it to a specific postaladdress record. You can't rely on the positioning of one element next to another in XML, only an element's position in the docuement hierarchy and any attributes/value it might have. So basically, its not going to work. And thats a deliberate limitation of XML/XSLT.