/** * Validate the specified file * Any validation errors thrown as an exception. * @param file The file to parse. * @param schemaStreamArray The schema as array of stream sources used to validate the specified file. * @throws Exception Thrown if an error occurred. */ public void validateFile(File file, StreamSource[] schemaStreamArray) throws Exception { // try parsing the file parseFileWithStreamArray(file, schemaStreamArray); }
/** * Validate the specified file * @param file The file to parse. * @param schemaStreamArray The schema as array of stream sources used to validate the specified file. * @return true if no errors */ public boolean isValidFile(File file, StreamSource[] schemaStreamArray) { try { // try parsing the file and return true if no errors parseFileWithStreamArray(file, schemaStreamArray); return true; } catch (Exception e) { return false; } }
transformFileWithStream(middleFileB, outputFile, STYLESHEET_C); Document doc = anOmeValidator.parseFileWithStreamArray(outputFile, schemaArray); Assert.assertNotNull(doc);
transformFileWithStream(middleFileB, outputFile, STYLESHEET_C); Document doc = anOmeValidator.parseFileWithStreamArray(outputFile, schemaArray); Assert.assertNotNull(doc);
transformFileWithStream(middleFileA, outputFile, STYLESHEET_B); Document doc = anOmeValidator.parseFileWithStreamArray(outputFile, schemaArray); Assert.assertNotNull(doc);