One idea was to hack into the resolver and upon encountering a certain
file name just return a stream fetched elsewhere. As it turns out it
could be done for XSD lookup but cannot be done for the XML document
referenced in document() function:
public void setURIResolver(URIResolver resolver)
Set the URIResolver to be used during stylesheet compilation. This
URIResolver, despite its name, is not used for resolving relative URIs
against a base URI; it is used for dereferencing an absolute URI
(after resolution) to return a Source representing the location where
a stylesheet module can be found.
This URIResolver is used to dereference the URIs appearing in
xsl:import, xsl:include, and xsl:import-schema declarations. It is not
used at run-time for resolving requests to the document() or similar
functions.
Parameters:
resolver - the URIResolver to be used during stylesheet
compilation.
So, I'm still stuck.
B.