Thanks everybody, seems so easy once I saw the examples :)
I am sure I will keep on kicking myself on the {} instead of ().
Reply to NetWallah:
The reason why I have to have tempd as a intermediate is due to XML parsing order. All fields come first from the way xml:twig returns, than the record details. Don't want to copy data once it is built, so the reference is made instead.