String expectedString = readAsString(expected);
String actualString = output.toString();
// Create the validator.
SchemaValidator schemaValidator = new SchemaValidator();
schemaValidator.addSchema(PolicySchemas.MARLIN_LPDM_V3_0);
schemaValidator.addSchemata(PolicySchemas.MARLIN_RPDM_DTDS);
schemaValidator.addSchemata(PolicySchemas.REPOSITORY_2005_09);
schemaValidator.addSchemata(PolicySchemas.REPOSITORY_2005_12);
schemaValidator.addSchemata(PolicySchemas.REPOSITORY_2006_02);
// Make sure that the input result is valid before comparing.
schemaValidator.validate(new StringContentInput(inputString));
// Make sure that the expected result is valid before comparing.
schemaValidator.validate(new StringContentInput(expectedString));
boolean worked = false;
try {
XMLAssert.assertXMLEqual("Result should be as expected",
new StringReader(expectedString),