private void ValidateEndStartElement() {
if (context.ElementDecl.HasDefaultAttribute) {
foreach (SchemaAttDef attdef in context.ElementDecl.DefaultAttDefs) {
reader.AddDefaultAttribute(attdef);
}
}
if (context.ElementDecl.HasRequiredAttribute) {
try {
context.ElementDecl.CheckAttributes(attPresence, reader.StandAlone);
}
catch (XmlSchemaException e) {
e.SetSource(reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition);
SendValidationEvent(e);
}
}
if (context.ElementDecl.Datatype != null) {
checkDatatype = true;
hasSibling = false;
textString = string.Empty;
textValue.Length = 0;
}
}