The most likely explanation is that the XSLT processor doesn't know the base URI of the stylesheet. Usually this happens when you load the stylesheet from some source such as a DOM or an inputstream where the original location is unknown. Calling setSystemId() on the supplied Source object fixes it.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference