def build_class(o_obj):
cls = ET.Element('<STR_LIT>', name=o_obj.key_lett, minOccurs='<STR_LIT:0>', maxOccurs='<STR_LIT>')<EOL>attributes = ET.SubElement(cls, '<STR_LIT>')<EOL>for o_attr in nav_many(o_obj).O_ATTR[<NUM_LIT>]():<EOL><INDENT>o_attr_ref = get_refered_attribute(o_attr)<EOL>s_dt = nav_one(o_attr_ref).S_DT[<NUM_LIT>]()<EOL>while nav_one(s_dt).S_UDT[<NUM_LIT>]():<EOL><INDENT>s_dt = nav_one(s_dt).S_UDT[<NUM_LIT>].S_DT[<NUM_LIT>]()<EOL><DEDENT>type_name = get_type_name(s_dt)<EOL>if type_name and not nav_one(o_attr).O_BATTR[<NUM_LIT>].O_DBATTR[<NUM_LIT>]():<EOL><INDENT>ET.SubElement(attributes, '<STR_LIT>', name=o_attr.name, type=type_name)<EOL><DEDENT>else:<EOL><INDENT>logger.warning('<STR_LIT>' % (o_obj.key_lett, o_attr.Name))<EOL><DEDENT><DEDENT>return cls<EOL>
Build an xsd complex element out of a O_OBJ, including its O_ATTR.