The initial implement is done already, just need few modification.
The input has two section, one is dictionary and one is the data. There are 4 nodes that will give you a number which is called "value", in stead of displaying the value, you will need to go to the dictionary section to find its mapping.
The 4 nodes are:
1. Data/ReferralGroup/Value ------> mapped to Dictionary/ReferralGroups/Option/Lable
[login to view URL] ---->Mapped to Dictionary/ReferralCauses/Option/Description
[login to view URL]>Dictionary/ProductTypes/Option/Label
[login to view URL]>Dictionary/ContactType/Option/label
Do not modify the structure of the existing output, just simply replace the displaying value to it's mapping.
Please see the attached xslt and input example.