Here is a first mockup (branch_3.x like the previous patch) of the version with EntityResolver.
This patch has some backwards breaks, because for XML files it is always broken to parse without a system identifier, so the ctors of SolrSchema and SolrConfig should not take InputStream but more a InputSource wrapper. With this patch everything compiles and tests and resolves correctly, but plugins using old methods may fail (needs review).
How it works:
The system identifier is no longer a plain filename with path, it gets initialized using a custom URI scheme "solrres:". This scheme is resolved using the EntityResolver that utilizes SolrResourceLoader. As long as somebody only gives relative URLs in XIncludes or anywhere else (this is also extendable to other places, not only xinclude, e.g. external XML entities inside XSLs, config of DIH,...), the files are staying using this scheme and are resolved by the custom EntityResolver. As soon as scheme changes, the default resolver is used.
Because of this, the good thing is, that somebody can still use absolute filesystem URLs or even external URLs in the xincludes, by using full schemed URIs like file:///my/absolute/path.
Other places in Solr that load XML and support Xinclude must also changed to this, currently almost every place where solr loads XML files from ResourceLoader using InputStreams are broken.
Questionable is also backwards compatibibility. Ideally there should be a loadResourceAsInputSource() method in ResourceLoader so DIH can also use it, which would also break backwards (interface!).
This patch is currently only for review about the idea. Comments welcome!