def setUp(self, tp):
<EOL>self._item = tp<EOL>assert tp.isElement() is True and(tp.content is None or (tp.content.isComplex() is True and tp.content.isLocal() is True)),'<STR_LIT>' %tp.content.getItemTrace()<EOL>self.name = tp.getAttribute('<STR_LIT:name>')<EOL>self.ns = tp.getTargetNamespace()<EOL>self.local = tp.isLocal()<EOL>complex = tp.content<EOL>if complex is None:<EOL><INDENT>self.mgContent = ()<EOL>return<EOL><DEDENT>if complex.content is None:<EOL><INDENT>self.mgContent = ()<EOL>self.attrComponents = self._setAttributes(complex.getAttributeContent())<EOL>return <EOL><DEDENT>is_simple = complex.content.isSimple()<EOL>if is_simple and complex.content.content.isExtension():<EOL><INDENT>self.mgContent = ()<EOL>self.attrComponents = self._setAttributes(complex.getAttributeContent())<EOL>return<EOL><DEDENT>if is_simple and complex.content.content.isRestriction():<EOL><INDENT>self.mgContent = ()<EOL>self.attrComponents = self._setAttributes(complex.getAttributeContent())<EOL>return<EOL><DEDENT>if is_simple:<EOL><INDENT>raise ContainerError('<STR_LIT>'%tp.getItemTrace())<EOL><DEDENT>is_complex = complex.content.isComplex()<EOL>if is_complex and complex.content.content is None:<EOL><INDENT>self.mgContent = ()<EOL>self.attrComponents = self._setAttributes(complex.getAttributeContent())<EOL>return<EOL><DEDENT>if (is_complex and complex.content.content.isExtension() and <EOL>complex.content.content.content is not None and<EOL>complex.content.content.content.isModelGroup()):<EOL><INDENT>self.mgContent = complex.content.content.content.content<EOL>self.attrComponents = self._setAttributes(<EOL>complex.content.content.getAttributeContent()<EOL>)<EOL>return<EOL><DEDENT>if (is_complex and complex.content.content.isRestriction() and<EOL>complex.content.content.content is not None and <EOL>complex.content.content.content.isModelGroup()):<EOL><INDENT>self.mgContent = complex.content.content.content.content<EOL>self.attrComponents = self._setAttributes(<EOL>complex.content.content.getAttributeContent()<EOL>)<EOL>return<EOL><DEDENT>if is_complex:<EOL><INDENT>self.mgContent = ()<EOL>self.attrComponents = self._setAttributes(complex.getAttributeContent())<EOL>return<EOL><DEDENT>if complex.content.isModelGroup():<EOL><INDENT>self.mgContent = complex.content.content<EOL>self.attrComponents = self._setAttributes(complex.getAttributeContent())<EOL>return<EOL><DEDENT>self.mgContent = ()<EOL>self.attrComponents = self._setAttributes(complex.getAttributeContent())<EOL>
{'xsd':['annotation', 'simpleContent', 'complexContent',\
'group', 'all', 'choice', 'sequence', 'attribute', 'attributeGroup',\
'anyAttribute', 'any']}