I can make guesses about what is wrong with your source code based only on the error messages, but if you don't show me the source code then there is always a high chance my guesses will be wrong.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference