internal void ValidationCallback(object sender, ValidationEventArgs args)
{
Debug.Assert(args != null);
if (args.Severity == XmlSeverityType.Error)
_isValid = false;
XmlSchemaValidationException exception = args.Exception as XmlSchemaValidationException;
if (exception != null && _reader != null)
exception.SetSourceObject(_reader.UnderlyingObject);
if (_nextEventHandler != null)
{
_nextEventHandler(sender, args);
}
else if (exception != null && args.Severity == XmlSeverityType.Error)
{
throw exception;
}
}