Since the input is "just" the URI string, and that string may come from within the document it seems only an API addition is possible, this is not gonna be easy to design,
Attached is a diff which I am using as a proof of concept for overriding the xmlParserInputBufferCreateFilename function (didnt bother with the output at this time). This is a much smaller change and does not break BC. Since I am trying to override all the File handling to use our streams, by doing this there is no longer a need to register our stream handlers anymore. It isnt pretty looking since its just a down and dirty POC (cut and pasted the registernode functionality for the globals and used some really long variable names), but seemed to work in my tests. On the request startup I set xmlRegisterParserInputBufferCreateFilenameValue to my internal function and on the request shutdown set it back to NULL so that it would be set back to its default handling. Would this be an appropriate solution to our current issue?
Attachment:
libxmlio.diff.txt
Description: Text document