/**
  * Validate the document against the given list of RELAX NG files.
  *
  * @param      AgaviXmlConfigDomDocument The document to act upon.
  * @param      array An array of file names to validate against.
  *
  * @author     David Zülke <*****@*****.**>
  * @author     Noah Fontes <*****@*****.**>
  * @since      0.11.0
  */
 public static function validateRelaxng(AgaviXmlConfigDomDocument $document, array $validationFiles = array())
 {
     foreach ($validationFiles as $validationFile) {
         if (!is_readable($validationFile)) {
             throw new AgaviUnreadableException(sprintf('RELAX NG validation file "%s" for configuration file "%s" does not exist or is unreadable', $validationFile, $document->documentURI));
         }
         try {
             $document->relaxNGValidate($validationFile);
         } catch (DOMException $dome) {
             throw new AgaviParseException(sprintf('RELAX NG validation of configuration file "%s" failed:' . "\n\n%s", $document->documentURI, $dome->getMessage()));
         }
     }
 }