def fromSchemaItem(self, item):
if item.isElement() is False or item.isLocal() is True:<EOL><INDENT>raise TypeError('<STR_LIT>' %item.getItemTrace())<EOL><DEDENT>local = False<EOL>qName = item.getAttribute('<STR_LIT:type>')<EOL>if not qName:<EOL><INDENT>etp = item.content<EOL>local = True<EOL><DEDENT>else:<EOL><INDENT>etp = item.getTypeDefinition('<STR_LIT:type>')<EOL><DEDENT>if etp is None:<EOL><INDENT>if local is True: <EOL><INDENT>self.content = ElementLocalComplexTypeContainer(do_extended=self.do_extended)<EOL><DEDENT>else: <EOL><INDENT>self.content = ElementSimpleTypeContainer()<EOL><DEDENT><DEDENT>elif etp.isLocal() is False:<EOL><INDENT>self.content = ElementGlobalDefContainer()<EOL><DEDENT>elif etp.isSimple() is True: <EOL><INDENT>self.content = ElementLocalSimpleTypeContainer()<EOL><DEDENT>elif etp.isComplex():<EOL><INDENT>self.content = ElementLocalComplexTypeContainer(do_extended=self.do_extended)<EOL><DEDENT>else:<EOL><INDENT>raise Wsdl2PythonError("<STR_LIT>" %item.getItemTrace())<EOL><DEDENT>self.logger.debug('<STR_LIT>' %(<EOL>self.content, item.getItemTrace()))<EOL>self.content.setUp(item)<EOL>
set up global elements.