System.Xml.Schema.SchemaElementDecl.CheckAttributes C# (CSharp) Method

CheckAttributes() public method

public CheckAttributes ( Hashtable presence, bool standalone ) : void
presence System.Collections.Hashtable
standalone bool
return void
        public void CheckAttributes(Hashtable presence, bool standalone) {
            foreach(SchemaAttDef attdef in attdefs.Values) {
                if (presence[attdef.Name] == null) {
                    if (attdef.Presence == SchemaDeclBase.Use.Required) {
                        throw new XmlSchemaException(Res.Sch_MissRequiredAttribute, attdef.Name.ToString());
                    }
                    else if (standalone && attdef.IsDeclaredInExternal && (attdef.Presence == SchemaDeclBase.Use.Default || attdef.Presence == SchemaDeclBase.Use.Fixed)) {
                        throw new XmlSchemaException(Res.Sch_StandAlone, string.Empty);
                    }
                }
            }
        }
    };