It is my understand that the XML must be completeted to be transformed. The best approach is to put the variables inside the XML then do the transformation. Adding variables to the XML implies modify the style sheet in most cases.
IHIH (I Hope I Helps)
Register Hereor login if you are already a member