private static void XDR_EndRoot(XdrBuilder builder)
{
//
// check undefined attribute types
// We already checked local attribute types, so only need to check global attribute types here
//
while (builder._UndefinedAttributeTypes != null)
{
XmlQualifiedName gname = builder._UndefinedAttributeTypes._TypeName;
// if there is no URN in this name then the name is local to the
// schema, but the global attribute was still URN qualified, so
// we need to qualify this name now.
if (gname.Namespace.Length == 0)
{
gname = new XmlQualifiedName(gname.Name, builder._TargetNamespace);
}
SchemaAttDef ad;
if (builder._SchemaInfo.AttributeDecls.TryGetValue(gname, out ad))
{
builder._UndefinedAttributeTypes._Attdef = (SchemaAttDef)ad.Clone();
builder._UndefinedAttributeTypes._Attdef.Name = gname;
builder.XDR_CheckAttributeDefault(builder._UndefinedAttributeTypes, builder._UndefinedAttributeTypes._Attdef);
}
else
{
builder.SendValidationEvent(SR.Sch_UndeclaredAttribute, gname.Name);
}
builder._UndefinedAttributeTypes = builder._UndefinedAttributeTypes._Next;
}
foreach (SchemaElementDecl ed in builder._UndeclaredElements.Values)
{
builder.SendValidationEvent(SR.Sch_UndeclaredElement, XmlQualifiedName.ToString(ed.Name.Name, ed.Prefix));
}
}