After namespace stripping, the source document is the temporary tree
created by the stripping process and it has the wrong base URI for
relative references. Earlier versions of this code used to try to
fix that by patching the elements with relative @fileref attributes.
That was inadequate because it calculated an absolute base URI without
considering that there might be xml:base attributes already in effect.
It seems obvious now that the right thing to do is simply to put the
xml:base on the root of the document. And that seems to work.