Schemas should only included when there is a "schemaLocation" attribute

This commit is contained in:
Christian Scheb 2012-07-31 16:57:35 +02:00
parent ef0361df59
commit 5b4f19d032
1 changed files with 10 additions and 8 deletions

View File

@ -189,6 +189,7 @@ class WsdlDownloader
$nodes = $xpath->query($query); $nodes = $xpath->query($query);
if ($nodes->length > 0) { if ($nodes->length > 0) {
foreach ($nodes as $node) { foreach ($nodes as $node) {
if ( $node->hasAttribute('schemaLocation') ) {
$schemaLocation = $node->getAttribute('schemaLocation'); $schemaLocation = $node->getAttribute('schemaLocation');
if ($this->isRemoteFile($schemaLocation)) { if ($this->isRemoteFile($schemaLocation)) {
$schemaLocation = $this->download($schemaLocation); $schemaLocation = $this->download($schemaLocation);
@ -200,6 +201,7 @@ class WsdlDownloader
} }
} }
} }
}
$doc->save($cacheFile); $doc->save($cacheFile);
} }