private void ValidateIdAttribute(XmlSchemaObject xso) {
if (xso.IdAttribute != null) {
try {
xso.IdAttribute = NameTable.Add(XmlConvert.VerifyNCName(xso.IdAttribute));
if (this.schema.Ids[xso.IdAttribute] != null) {
SendValidationEvent(Res.Sch_DupIdAttribute, xso);
}
else {
this.schema.Ids.Add(xso.IdAttribute, xso);
}
}
catch (Exception ex){
SendValidationEvent(Res.Sch_InvalidIdAttribute, ex.Message, xso);
}
}
}