Sorry I don't have time to look at your code. However, in general, if you are using XSLT to do the transform, VBScript or any other language used is very simple to code - open/load XML doc into XML DOM object, same for XSL file, then do the transform of the XML with the XSL.
So any problems you get are from your XSL file, unless you have syntactically bad XML. You'll just have to keep on tweaking the XSL until you get the desired output. Go see some XSLT tutorials online to familiarize yourself with how to work with XSL.