| @@ 39-46 (lines=8) @@ | ||
| 36 | str_replace("\n", '', $lastError->message) . ').'); |
|
| 37 | } |
|
| 38 | $valid = @$dom->schemaValidate($this->getSchema()); |
|
| 39 | if (!$valid) { |
|
| 40 | $lastError = libxml_get_last_error(); |
|
| 41 | $lastErrorMessage = str_replace("\n", '', $lastError->message); |
|
| 42 | throw new ValidationFailedException( |
|
| 43 | 'The given xml file did not Validate vs. ' . |
|
| 44 | $this->getSchema() . ' (last error: ' . |
|
| 45 | $lastErrorMessage . ').'); |
|
| 46 | } |
|
| 47 | } |
|
| 48 | } |
|
| 49 | } |
|
| @@ 58-65 (lines=8) @@ | ||
| 55 | $valid = false; |
|
| 56 | } |
|
| 57 | ||
| 58 | if (!$valid) { |
|
| 59 | $lastError = libxml_get_last_error(); |
|
| 60 | $lastErrorMessage = str_replace("\n", '', $lastError->message); |
|
| 61 | throw new ValidationFailedException( |
|
| 62 | 'The given sitemap file did not validate vs. ' . |
|
| 63 | $this->getSchema() . ' (last error: ' . |
|
| 64 | $lastErrorMessage . ').'); |
|
| 65 | } |
|
| 66 | } |
|
| 67 | } |
|
| 68 | ||