def __checkAttributes(self):
for a in self.__class__.required:<EOL><INDENT>if a not in self.attributes:<EOL><INDENT>raise SchemaError('<STR_LIT>'%(self.__class__, a))<EOL><DEDENT><DEDENT>for a,v in list(self.attributes.items()):<EOL><INDENT>if type(v) is dict:<EOL><INDENT>continue<EOL><DEDENT>if a in (XMLSchemaComponent.xmlns, XMLNS.XML):<EOL><INDENT>continue<EOL><DEDENT>if (a not in list(self.__class__.attributes.keys())) and not(self.isAttribute() and self.isReference()):<EOL><INDENT>raise SchemaError('<STR_LIT>'%(self.getItemTrace(), a, self.attributes[a]))<EOL><DEDENT><DEDENT>
Checks that required attributes have been defined,
           attributes w/default cannot be required.   Checks
           all defined attributes are legal, attribute 
           references are not subject to this test.