code: def fromSchemaItem(self, item):
          
          if item.isElement() is False or item.isLocal() is True:
              raise TypeError, 'expecting global element declaration: %s' %item.getItemTrace()
  
          local = False
          qName = item.getAttribute('type')
          if not qName:
              etp = item.content
              local = True
          else:
              etp = item.getTypeDefinition('type')
              
          if etp is None:
              if local is True: 
                  self.content = ElementLocalComplexTypeContainer(do_extended=self.do_extended)
              else: 
                  self.content = ElementSimpleTypeContainer()
          elif etp.isLocal() is False:
              self.content = ElementGlobalDefContainer()
          elif etp.isSimple() is True: 
              self.content = ElementLocalSimpleTypeContainer()
          elif etp.isComplex():
              self.content = ElementLocalComplexTypeContainer(do_extended=self.do_extended)
          else:
              raise Wsdl2PythonError, "Unknown element declaration: %s" %item.getItemTrace()
  
          self.logger.debug('ElementWriter setUp container "%r", Schema Item "%s"' %(
              self.content, item.getItemTrace()))
          
          self.content.setUp(item)
docs: set up global elements.