The fact that Dave Pawson and I gave you completely different
answers doesn't mean either of us is wrong, it means we are groping in the dark.
You aren't supplying enough information about what you are doing or what effect
it is having.
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,