def _setAttributes(self, attributes):
atd = self.attribute_typecode<EOL>atd_list = formatted_attribute_list = []<EOL>if not attributes:<EOL><INDENT>return formatted_attribute_list<EOL><DEDENT>atd_list.append('<STR_LIT>')<EOL>idx = <NUM_LIT:0><EOL>while(idx < len(attributes)):<EOL><INDENT>a = attributes[idx] <EOL>idx += <NUM_LIT:1><EOL>if a.isWildCard() and a.isDeclaration():<EOL><INDENT>atd_list.append('<STR_LIT>'% (atd, SCHEMA.XSD3)<EOL>)<EOL><DEDENT>elif a.isDeclaration():<EOL><INDENT>tdef = a.getTypeDefinition('<STR_LIT:type>')<EOL>if tdef is not None:<EOL><INDENT>tc = '<STR_LIT>' %(NAD.getAlias(tdef.getTargetNamespace()),<EOL>self.mangle(type_class_name(tdef.getAttributeName()))<EOL>)<EOL><DEDENT>else:<EOL><INDENT>t = a.getAttribute('<STR_LIT:type>')<EOL>try:<EOL><INDENT>tc = BTI.get_typeclass(t[<NUM_LIT:1>], t[<NUM_LIT:0>])<EOL><DEDENT>except:<EOL><INDENT>tc = ZSI.TC.String<EOL><DEDENT>if tc is not None: <EOL><INDENT>tc = '<STR_LIT>' %tc<EOL><DEDENT><DEDENT>key = None<EOL>if a.getAttribute('<STR_LIT>') == '<STR_LIT>':<EOL><INDENT>key = '<STR_LIT>' % ( a.getTargetNamespace(),<EOL>a.getAttribute('<STR_LIT:name>') )<EOL><DEDENT>elif a.getAttribute('<STR_LIT>') == '<STR_LIT>':<EOL><INDENT>key = '<STR_LIT>' % a.getAttribute('<STR_LIT:name>')<EOL><DEDENT>else:<EOL><INDENT>raise ContainerError('<STR_LIT>'% a.getAttribute('<STR_LIT>'))<EOL><DEDENT>atd_list.append('<STR_LIT>' % (atd, key, tc)<EOL>)<EOL><DEDENT>elif a.isReference() and a.isAttributeGroup():<EOL><INDENT>for ga in a.getAttributeGroup().getAttributeContent():<EOL><INDENT>attributes += (ga,)<EOL><DEDENT><DEDENT>elif a.isReference():<EOL><INDENT>try:<EOL><INDENT>ga = a.getAttributeDeclaration()<EOL><DEDENT>except XMLSchema.SchemaError:<EOL><INDENT>key = a.getAttribute('<STR_LIT>')<EOL>self.logger.debug('<STR_LIT>' %key)<EOL>if key in self.built_in_refs: continue<EOL>raise<EOL><DEDENT>tp = None<EOL>if ga is not None:<EOL><INDENT>tp = ga.getTypeDefinition('<STR_LIT:type>')           <EOL>key = '<STR_LIT>' %(ga.getTargetNamespace(),<EOL>ga.getAttribute('<STR_LIT:name>'))<EOL><DEDENT>if ga is None:<EOL><INDENT>key = '<STR_LIT>' %(<EOL>a.getAttribute('<STR_LIT>').getTargetNamespace(),<EOL>a.getAttribute('<STR_LIT>').getName())<EOL>atd_list.append('<STR_LIT>' %(atd, key)<EOL>)<EOL><DEDENT>elif tp is None:<EOL><INDENT>try:<EOL><INDENT>namespace,typeName = ga.getAttribute('<STR_LIT:type>')<EOL><DEDENT>except TypeError as ex:<EOL><INDENT>atd_list.append('<STR_LIT>' %(atd, key)<EOL>)<EOL><DEDENT>else:<EOL><INDENT>atd_list.append('<STR_LIT>' %(atd, key, <EOL>BTI.get_typeclass(typeName, namespace))<EOL>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>typeName = tp.getAttribute('<STR_LIT:name>')<EOL>namespace = tp.getTargetNamespace()<EOL>alias = NAD.getAlias(namespace)<EOL>key = '<STR_LIT>'% (ga.getTargetNamespace(),ga.getAttribute('<STR_LIT:name>'))<EOL>atd_list.append('<STR_LIT>'% (atd, key, alias, type_class_name(typeName))<EOL>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise TypeError('<STR_LIT>' %a.getItemTrace())<EOL><DEDENT><DEDENT>return formatted_attribute_list<EOL>
parameters
        attributes -- a flat list of all attributes, 
        from this list all items in attribute_typecode_dict will
        be generated into attrComponents.

        returns a list of strings representing the attribute_typecode_dict.