public void ValidateOvalDefinitions(bool validateSchematron) { foreach (var definitionInfo in this.RequestedDefinitions) { var ovalDefinitionsXml = definitionInfo.Text; var ovalDefinitionsValidator = new OvalDefinitionsValidator(ovalDefinitionsXml, definitionInfo.Id); if (!ovalDefinitionsValidator.Schema.IsValid) throw new OvalDefinitionsValidationException(ovalDefinitionsValidator.Schema.ErrorList); if (validateSchematron) { var schematron = ovalDefinitionsValidator.ValidateSchematron(); if (!schematron.IsValid) throw new OvalDefinitionsValidationException(schematron.ErrorList); } } }
public void ValidateOvalDefinitions(bool validateSchematron) { foreach (var definitionInfo in this.RequestedDefinitions) { var ovalDefinitionsXml = definitionInfo.Text; var ovalDefinitionsValidator = new OvalDefinitionsValidator(ovalDefinitionsXml, definitionInfo.Id); if (!ovalDefinitionsValidator.Schema.IsValid) { throw new OvalDefinitionsValidationException(ovalDefinitionsValidator.Schema.ErrorList); } if (validateSchematron) { var schematron = ovalDefinitionsValidator.ValidateSchematron(); if (!schematron.IsValid) { throw new OvalDefinitionsValidationException(schematron.ErrorList); } } } }