Skip to content

Commit

Permalink
[DependencyInjection] fixed XSD validation on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Feb 4, 2010
1 parent 9a478f1 commit 28554c5
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -235,14 +235,14 @@ protected function validate($dom, $file)

protected function validateSchema($dom, $file)
{
$schemaLocations = array('http://www.symfony-project.org/schema/dic/services' => __DIR__.'/schema/dic/services/services-1.0.xsd');
$schemaLocations = array('http://www.symfony-project.org/schema/dic/services' => str_replace('\\', '/', __DIR__.'/schema/dic/services/services-1.0.xsd'));

if ($element = $dom->documentElement->getAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'schemaLocation'))
{
$items = preg_split('/\s+/', $element);
for ($i = 0, $nb = count($items); $i < $nb; $i += 2)
{
$schemaLocations[$items[$i]] = str_replace('http://www.symfony-project.org/', __DIR__.'/', $items[$i + 1]);
$schemaLocations[$items[$i]] = str_replace('http://www.symfony-project.org/', str_replace('\\', '/', __DIR__).'/', $items[$i + 1]);
}
}

Expand Down

0 comments on commit 28554c5

Please sign in to comment.