With Xalan there is the following, non-official function :
I use it on a transformation of a local file and it gives me the absolute path of the XML file being transformed. I found that function browsing the Xalan code, it is part of the class FuncDoclocation
.