If you use the loadXML() method instead of the load() one (let's say, to process the XML string before loading and parsing it), you will have problems with xinclude(), because the parser will not know where to find the files to include.
Using chdir() before xinclude() will not help.
The solution is to set the documentURI property of the DOMDocument object accordingly to it's original filename, and everything will work fine !
<?php
$xml = file_get_contents($file);
$xml = do_something_with($xml);
$doc = new DOMDocument;
$doc->documentURI = $file;
$doc->loadXML($xml);
$doc->xinclude();
?>