def _setTypecodeList(self):
self.logger.debug("<STR_LIT>" %<EOL>(self.mgContent, self._item.getItemTrace()))<EOL>flat = []<EOL>content = self.mgContent<EOL>if type(content) is not tuple:<EOL><INDENT>mg = content<EOL>if not mg.isModelGroup():<EOL><INDENT>raise Wsdl2PythonErr("<STR_LIT>" %<EOL>mg.getItemTrace())<EOL><DEDENT>self.logger.debug("<STR_LIT>" %<EOL>(mg, mg.content, mg.getItemTrace()))<EOL>if mg.isReference():<EOL><INDENT>raise RuntimeError("<STR_LIT>" %<EOL>mg.getItemTrace())<EOL><DEDENT>if mg.isDefinition():<EOL><INDENT>mg = mg.content<EOL><DEDENT>if mg.isAll():<EOL><INDENT>flat = mg.content<EOL>content = [] <EOL><DEDENT>elif mg.isSequence():<EOL><INDENT>content = mg.content<EOL><DEDENT>elif mg.isChoice():<EOL><INDENT>content = mg.content<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT><DEDENT>idx = <NUM_LIT:0><EOL>content = list(content)<EOL>self.logger.debug("<STR_LIT>" %content)<EOL>while idx < len(content):<EOL><INDENT>c = orig = content[idx]<EOL>if c.isElement():<EOL><INDENT>flat.append(c)<EOL>idx += <NUM_LIT:1><EOL>continue<EOL><DEDENT>if c.isReference() and c.isModelGroup():<EOL><INDENT>c = c.getModelGroupReference()<EOL><DEDENT>if c.isDefinition() and c.isModelGroup():<EOL><INDENT>c = c.content<EOL><DEDENT>if c.isSequence() or c.isChoice():<EOL><INDENT>begIdx = idx<EOL>endIdx = begIdx + len(c.content)<EOL>for i in range(begIdx, endIdx):<EOL><INDENT>content.insert(i, c.content[i-begIdx])<EOL><DEDENT>content.remove(orig)<EOL>continue<EOL><DEDENT>raise ContainerError('<STR_LIT>' %c.getItemTrace())<EOL><DEDENT>self.logger.debug("<STR_LIT>" %list(flat))<EOL>for c in flat:<EOL><INDENT>tc = TcListComponentContainer()<EOL>min,max,nil = self._getOccurs(c)<EOL>min = max = None<EOL>maxOccurs = <NUM_LIT:1><EOL>parent = c<EOL>defs = []<EOL>while defs.count(parent) <= <NUM_LIT:1>:<EOL><INDENT>max = parent.getAttribute('<STR_LIT>')<EOL>if max == '<STR_LIT>':<EOL><INDENT>maxOccurs = '<STR_LIT>' %max <EOL>break<EOL><DEDENT>maxOccurs = int(max) * maxOccurs<EOL>parent = parent._parent()<EOL>if not parent.isModelGroup():<EOL><INDENT>break<EOL><DEDENT>if parent.isReference():<EOL><INDENT>parent = parent.getModelGroupReference()<EOL><DEDENT>if parent.isDefinition():<EOL><INDENT>parent = parent.content<EOL>defs.append(parent)<EOL><DEDENT><DEDENT>del defs<EOL>parent = c<EOL>while <NUM_LIT:1>:<EOL><INDENT>minOccurs = int(parent.getAttribute('<STR_LIT>'))<EOL>if minOccurs == <NUM_LIT:0> or parent.isChoice():<EOL><INDENT>minOccurs = <NUM_LIT:0><EOL>break<EOL><DEDENT>parent = parent._parent()<EOL>if not parent.isModelGroup():<EOL><INDENT>minOccurs = int(c.getAttribute('<STR_LIT>'))<EOL>break<EOL><DEDENT>if parent.isReference():<EOL><INDENT>parent = parent.getModelGroupReference()<EOL><DEDENT>if parent.isDefinition():<EOL><INDENT>parent = parent.content       <EOL><DEDENT><DEDENT>tc.setOccurs(minOccurs, maxOccurs, nil)<EOL>processContents = self._getProcessContents(c)<EOL>tc.setProcessContents(processContents)<EOL>if c.isDeclaration() and c.isElement():<EOL><INDENT>global_type = c.getAttribute('<STR_LIT:type>')<EOL>content = getattr(c, '<STR_LIT:content>', None)<EOL>if c.isLocal() and c.isQualified() is False:<EOL><INDENT>tc.unQualified()<EOL><DEDENT>if c.isWildCard():<EOL><INDENT>tc.setStyleAnyElement()<EOL><DEDENT>elif global_type is not None:<EOL><INDENT>tc.name = c.getAttribute('<STR_LIT:name>')<EOL>ns = global_type[<NUM_LIT:0>]<EOL>if ns in SCHEMA.XSD_LIST:<EOL><INDENT>tpc = BTI.get_typeclass(global_type[<NUM_LIT:1>],global_type[<NUM_LIT:0>])<EOL>tc.klass = tpc<EOL>
generates ofwhat content, minOccurs/maxOccurs facet generation.
        Dependency instance attribute:
            mgContent -- expected to be either a complex definition
                with model group content, a model group, or model group 
                content.  TODO: should only support the first two.
            localTypes -- produce local class definitions later
            tcListElements -- elements, local/global