I am having a xml document with uses xinclude for access several other xml files.
Chapter in Main Doc
This is not a complete solution but it may be enough for your needs. The following XSLT 2.0 style-sheet copies a document, expanding out XIncludes (with caveats noted following).
This solution does not implement the attributes: xpointer, accept and accept-language.