Looking at the source for net.sf.saxon.trace.AbstractTraceListener I see that the file attribute is indeed the input file as a <source/> tag is really reporting a change in context node.  What I'm looking for is the @module attribute of whatever tag gets generated by the enter() function.  I have none of these in my trace log.  Perhaps I have to turn it on, somehow...