How big is your file, and how much memory did you allocate?
If you're not familiar with it, the way you allocate memory to Java on the command line is with a switch such as
java -Xmx512m net.sf.saxon.Transform...
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference