goetas/xsd-reader — pull request #8 by das-peter (2014-12-02 08:03:07+00:00)
Title: Ensure local file "urls" are handled properly.

# Issue
If I run the processing on the xsd files provided here https://www.vdv.de/ip-kom-oev.aspx (https://www.vdv.de/trias-xsd-v1.0.zipx?forced=true) I get following error:
Warning: DOMDocument::load(): I/O warning : failed to load external entity
```"file:///W:/htdocs/customer/sites/all/modules/contrib/clients_vdv/file%253A/W%253A/htdocs/customer/sites/all/modules/contrib/clients_vdv/trias-xsd-v1.0/siri-1.4/siri_situationExchange_service.xsd" in W:\htdocs\customer\sites\all\modules\contrib\clients_vdv\vendor\goetas\xsd-reader\src\SchemaReader.php on line 758```

## System Info
PHP 5.5.10 64x VC11
Win 8

# Solution proposal
It seems like includes on local files aren't handled properly. I've added code to detect and handle local file includes in UrlUtils::resolveRelativeUrl().
The code uses realpath() to convert the path into a system specific absolute path. But if realpath() doesn't find a file it rather returns the raw file path without the file:// schema instead FALSE as returned by realpath(). I think this keeps the information level higher in case of an subsequent error.