text: #!/usr/bin/env python
  # -*- coding: utf-8 -*-
  
  #
  # Generated  by generateDS.py.
  #
  # Command line options:
  #   ('--no-dates', '')
  #   ('--no-versions', '')
  #   ('--silence', '')
  #   ('--member-specs', 'list')
  #   ('-f', '')
  #   ('-o', 'tests/people_procincl2_sup.py')
  #   ('-s', 'tests/people_procincl2_sub.py')
  #   ('--super', 'people_procincl2_sup')
  #
  # Command line arguments:
  #   tests/people_procincl.xsd
  #
  # Command line:
  #   generateDS.py --no-dates --no-versions --silence --member-specs="list" -f -o "tests/people_procincl2_sup.py" -s "tests/people_procincl2_sub.py" --super="people_procincl2_sup" tests/people_procincl.xsd
  #
  # Current working directory (os.getcwd()):
  #   generateds
  #
  
  import sys
  import re as re_
  import base64
  import datetime as datetime_
  import warnings as warnings_
  try:
      from lxml import etree as etree_
  except ImportError:
      from xml.etree import ElementTree as etree_
  
  
  Validate_simpletypes_ = True
  if sys.version_info.major == 2:
      BaseStrType_ = basestring
  else:
      BaseStrType_ = str
  
  
  def parsexml_(infile, parser=None, **kwargs):
      if parser is None:
          # Use the lxml ElementTree compatible parser so that, e.g.,
          #   we ignore comments.
          try:
              parser = etree_.ETCompatXMLParser()
          except AttributeError:
              # fallback to xml.etree
              parser = etree_.XMLParser()
      doc = etree_.parse(infile, parser=parser, **kwargs)
      return doc
  
  #
  # User methods
  #
  # Calls to the methods in these classes are generated by generateDS.py.
  # You can replace these methods by re-implementing the following class
  #   in a module named generatedssuper.py.
  
  try:
      from generatedssuper import GeneratedsSuper
  except ImportError as exp:
  
      class GeneratedsSuper(object):
          tzoff_pattern = re_.compile(r'(\+|-)((0\d|1[0-3]):[0-5]\d|14:00)$')
          class _FixedOffsetTZ(datetime_.tzinfo):
              def __init__(self, offset, name):
                  self.__offset = datetime_.timedelta(minutes=offset)
                  self.__name = name
              def utcoffset(self, dt):
                  return self.__offset
              def tzname(self, dt):
                  return self.__name
              def dst(self, dt):
                  return None
          def gds_format_string(self, input_data, input_name=''):
              return input_data
          def gds_validate_string(self, input_data, node=None, input_name=''):
              if not input_data:
                  return ''
              else:
                  return input_data
          def gds_format_base64(self, input_data, input_name=''):
              return base64.b64encode(input_data)
          def gds_validate_base64(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_integer(self, input_data, input_name=''):
              return '%d' % input_data
          def gds_validate_integer(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_integer_list(self, input_data, input_name=''):
              return '%s' % ' '.join(input_data)
          def gds_validate_integer_list(
                  self, input_data, node=None, input_name=''):
              values = input_data.split()
              for value in values:
                  try:
                      int(value)
                  except (TypeError, ValueError):
                      raise_parse_error(node, 'Requires sequence of integers')
              return values
          def gds_format_float(self, input_data, input_name=''):
              return ('%.15f' % input_data).rstrip('0')
          def gds_validate_float(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_float_list(self, input_data, input_name=''):
              return '%s' % ' '.join(input_data)
          def gds_validate_float_list(
                  self, input_data, node=None, input_name=''):
              values = input_data.split()
              for value in values:
                  try:
                      float(value)
                  except (TypeError, ValueError):
                      raise_parse_error(node, 'Requires sequence of floats')
              return values
          def gds_format_double(self, input_data, input_name=''):
              return '%e' % input_data
          def gds_validate_double(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_double_list(self, input_data, input_name=''):
              return '%s' % ' '.join(input_data)
          def gds_validate_double_list(
                  self, input_data, node=None, input_name=''):
              values = input_data.split()
              for value in values:
                  try:
                      float(value)
                  except (TypeError, ValueError):
                      raise_parse_error(node, 'Requires sequence of doubles')
              return values
          def gds_format_boolean(self, input_data, input_name=''):
              return ('%s' % input_data).lower()
          def gds_validate_boolean(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_boolean_list(self, input_data, input_name=''):
              return '%s' % ' '.join(input_data)
          def gds_validate_boolean_list(
                  self, input_data, node=None, input_name=''):
              values = input_data.split()
              for value in values:
                  if value not in ('true', '1', 'false', '0', ):
                      raise_parse_error(
                          node,
                          'Requires sequence of booleans '
                          '("true", "1", "false", "0")')
              return values
          def gds_validate_datetime(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_datetime(self, input_data, input_name=''):
              if input_data.microsecond == 0:
                  _svalue = '%04d-%02d-%02dT%02d:%02d:%02d' % (
                      input_data.year,
                      input_data.month,
                      input_data.day,
                      input_data.hour,
                      input_data.minute,
                      input_data.second,
                  )
              else:
                  _svalue = '%04d-%02d-%02dT%02d:%02d:%02d.%s' % (
                      input_data.year,
                      input_data.month,
                      input_data.day,
                      input_data.hour,
                      input_data.minute,
                      input_data.second,
                      ('%f' % (float(input_data.microsecond) / 1000000))[2:],
                  )
              if input_data.tzinfo is not None:
                  tzoff = input_data.tzinfo.utcoffset(input_data)
                  if tzoff is not None:
                      total_seconds = tzoff.seconds + (86400 * tzoff.days)
                      if total_seconds == 0:
                          _svalue += 'Z'
                      else:
                          if total_seconds < 0:
                              _svalue += '-'
                              total_seconds *= -1
                          else:
                              _svalue += '+'
                          hours = total_seconds // 3600
                          minutes = (total_seconds - (hours * 3600)) // 60
                          _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
              return _svalue
          @classmethod
          def gds_parse_datetime(cls, input_data):
              tz = None
              if input_data[-1] == 'Z':
                  tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
                  input_data = input_data[:-1]
              else:
                  results = GeneratedsSuper.tzoff_pattern.search(input_data)
                  if results is not None:
                      tzoff_parts = results.group(2).split(':')
                      tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
                      if results.group(1) == '-':
                          tzoff *= -1
                      tz = GeneratedsSuper._FixedOffsetTZ(
                          tzoff, results.group(0))
                      input_data = input_data[:-6]
              time_parts = input_data.split('.')
              if len(time_parts) > 1:
                  micro_seconds = int(float('0.' + time_parts[1]) * 1000000)
                  input_data = '%s.%s' % (time_parts[0], micro_seconds, )
                  dt = datetime_.datetime.strptime(
                      input_data, '%Y-%m-%dT%H:%M:%S.%f')
              else:
                  dt = datetime_.datetime.strptime(
                      input_data, '%Y-%m-%dT%H:%M:%S')
              dt = dt.replace(tzinfo=tz)
              return dt
          def gds_validate_date(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_date(self, input_data, input_name=''):
              _svalue = '%04d-%02d-%02d' % (
                  input_data.year,
                  input_data.month,
                  input_data.day,
              )
              try:
                  if input_data.tzinfo is not None:
                      tzoff = input_data.tzinfo.utcoffset(input_data)
                      if tzoff is not None:
                          total_seconds = tzoff.seconds + (86400 * tzoff.days)
                          if total_seconds == 0:
                              _svalue += 'Z'
                          else:
                              if total_seconds < 0:
                                  _svalue += '-'
                                  total_seconds *= -1
                              else:
                                  _svalue += '+'
                              hours = total_seconds // 3600
                              minutes = (total_seconds - (hours * 3600)) // 60
                              _svalue += '{0:02d}:{1:02d}'.format(
                                  hours, minutes)
              except AttributeError:
                  pass
              return _svalue
          @classmethod
          def gds_parse_date(cls, input_data):
              tz = None
              if input_data[-1] == 'Z':
                  tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
                  input_data = input_data[:-1]
              else:
                  results = GeneratedsSuper.tzoff_pattern.search(input_data)
                  if results is not None:
                      tzoff_parts = results.group(2).split(':')
                      tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
                      if results.group(1) == '-':
                          tzoff *= -1
                      tz = GeneratedsSuper._FixedOffsetTZ(
                          tzoff, results.group(0))
                      input_data = input_data[:-6]
              dt = datetime_.datetime.strptime(input_data, '%Y-%m-%d')
              dt = dt.replace(tzinfo=tz)
              return dt.date()
          def gds_validate_time(self, input_data, node=None, input_name=''):
              return input_data
          def gds_format_time(self, input_data, input_name=''):
              if input_data.microsecond == 0:
                  _svalue = '%02d:%02d:%02d' % (
                      input_data.hour,
                      input_data.minute,
                      input_data.second,
                  )
              else:
                  _svalue = '%02d:%02d:%02d.%s' % (
                      input_data.hour,
                      input_data.minute,
                      input_data.second,
                      ('%f' % (float(input_data.microsecond) / 1000000))[2:],
                  )
              if input_data.tzinfo is not None:
                  tzoff = input_data.tzinfo.utcoffset(input_data)
                  if tzoff is not None:
                      total_seconds = tzoff.seconds + (86400 * tzoff.days)
                      if total_seconds == 0:
                          _svalue += 'Z'
                      else:
                          if total_seconds < 0:
                              _svalue += '-'
                              total_seconds *= -1
                          else:
                              _svalue += '+'
                          hours = total_seconds // 3600
                          minutes = (total_seconds - (hours * 3600)) // 60
                          _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
              return _svalue
          def gds_validate_simple_patterns(self, patterns, target):
              # pat is a list of lists of strings/patterns.  We should:
              # - AND the outer elements
              # - OR the inner elements
              found1 = True
              for patterns1 in patterns:
                  found2 = False
                  for patterns2 in patterns1:
                      if re_.search(patterns2, target) is not None:
                          found2 = True
                          break
                  if not found2:
                      found1 = False
                      break
              return found1
          @classmethod
          def gds_parse_time(cls, input_data):
              tz = None
              if input_data[-1] == 'Z':
                  tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
                  input_data = input_data[:-1]
              else:
                  results = GeneratedsSuper.tzoff_pattern.search(input_data)
                  if results is not None:
                      tzoff_parts = results.group(2).split(':')
                      tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
                      if results.group(1) == '-':
                          tzoff *= -1
                      tz = GeneratedsSuper._FixedOffsetTZ(
                          tzoff, results.group(0))
                      input_data = input_data[:-6]
              if len(input_data.split('.')) > 1:
                  dt = datetime_.datetime.strptime(input_data, '%H:%M:%S.%f')
              else:
                  dt = datetime_.datetime.strptime(input_data, '%H:%M:%S')
              dt = dt.replace(tzinfo=tz)
              return dt.time()
          def gds_str_lower(self, instring):
              return instring.lower()
          def get_path_(self, node):
              path_list = []
              self.get_path_list_(node, path_list)
              path_list.reverse()
              path = '/'.join(path_list)
              return path
          Tag_strip_pattern_ = re_.compile(r'\{.*\}')
          def get_path_list_(self, node, path_list):
              if node is None:
                  return
              tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)
              if tag:
                  path_list.append(tag)
              self.get_path_list_(node.getparent(), path_list)
          def get_class_obj_(self, node, default_class=None):
              class_obj1 = default_class
              if 'xsi' in node.nsmap:
                  classname = node.get('{%s}type' % node.nsmap['xsi'])
                  if classname is not None:
                      names = classname.split(':')
                      if len(names) == 2:
                          classname = names[1]
                      class_obj2 = globals().get(classname)
                      if class_obj2 is not None:
                          class_obj1 = class_obj2
              return class_obj1
          def gds_build_any(self, node, type_name=None):
              return None
          @classmethod
          def gds_reverse_node_mapping(cls, mapping):
              return dict(((v, k) for k, v in mapping.iteritems()))
          @staticmethod
          def gds_encode(instring):
              if sys.version_info.major == 2:
                  return instring.encode(ExternalEncoding)
              else:
                  return instring
  
      def getSubclassFromModule_(module, class_):
          '''Get the subclass of a class from a specific module.'''
          name = class_.__name__ + 'Sub'
          if hasattr(module, name):
              return getattr(module, name)
          else:
              return None
  
  
  #
  # If you have installed IPython you can uncomment and use the following.
  # IPython is available from http://ipython.scipy.org/.
  #
  
  ## from IPython.Shell import IPShellEmbed
  ## args = ''
  ## ipshell = IPShellEmbed(args,
  ##     banner = 'Dropping into IPython',
  ##     exit_msg = 'Leaving Interpreter, back to program.')
  
  # Then use the following line where and when you want to drop into the
  # IPython shell:
  #    ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')
  
  #
  # Globals
  #
  
  ExternalEncoding = 'ascii'
  Tag_pattern_ = re_.compile(r'({.*})?(.*)')
  String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
  Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')
  CDATA_pattern_ = re_.compile(r"<!\[CDATA\[.*?\]\]>", re_.DOTALL)
  
  # Change this to redirect the generated superclass module to use a
  # specific subclass module.
  CurrentSubclassModule_ = None
  
  #
  # Support/utility functions.
  #
  
  
  def showIndent(outfile, level, pretty_print=True):
      if pretty_print:
          for idx in range(level):
              outfile.write('    ')
  
  
  def quote_xml(inStr):
      "Escape markup chars, but do not modify CDATA sections."
      if not inStr:
          return ''
      s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)
      s2 = ''
      pos = 0
      matchobjects = CDATA_pattern_.finditer(s1)
      for mo in matchobjects:
          s3 = s1[pos:mo.start()]
          s2 += quote_xml_aux(s3)
          s2 += s1[mo.start():mo.end()]
          pos = mo.end()
      s3 = s1[pos:]
      s2 += quote_xml_aux(s3)
      return s2
  
  
  def quote_xml_aux(inStr):
      s1 = inStr.replace('&', '&amp;')
      s1 = s1.replace('<', '&lt;')
      s1 = s1.replace('>', '&gt;')
      return s1
  
  
  def quote_attrib(inStr):
      s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)
      s1 = s1.replace('&', '&amp;')
      s1 = s1.replace('<', '&lt;')
      s1 = s1.replace('>', '&gt;')
      if '"' in s1:
          if "'" in s1:
              s1 = '"%s"' % s1.replace('"', "&quot;")
          else:
              s1 = "'%s'" % s1
      else:
          s1 = '"%s"' % s1
      return s1
  
  
  def quote_python(inStr):
      s1 = inStr
      if s1.find("'") == -1:
          if s1.find('\n') == -1:
              return "'%s'" % s1
          else:
              return "'''%s'''" % s1
      else:
          if s1.find('"') != -1:
              s1 = s1.replace('"', '\\"')
          if s1.find('\n') == -1:
              return '"%s"' % s1
          else:
              return '"""%s"""' % s1
  
  
  def get_all_text_(node):
      if node.text is not None:
          text = node.text
      else:
          text = ''
      for child in node:
          if child.tail is not None:
              text += child.tail
      return text
  
  
  def find_attr_value_(attr_name, node):
      attrs = node.attrib
      attr_parts = attr_name.split(':')
      value = None
      if len(attr_parts) == 1:
          value = attrs.get(attr_name)
      elif len(attr_parts) == 2:
          prefix, name = attr_parts
          namespace = node.nsmap.get(prefix)
          if namespace is not None:
              value = attrs.get('{%s}%s' % (namespace, name, ))
      return value
  
  
  class GDSParseError(Exception):
      pass
  
  
  def raise_parse_error(node, msg):
      msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, )
      raise GDSParseError(msg)
  
  
  class MixedContainer:
      # Constants for category:
      CategoryNone = 0
      CategoryText = 1
      CategorySimple = 2
      CategoryComplex = 3
      # Constants for content_type:
      TypeNone = 0
      TypeText = 1
      TypeString = 2
      TypeInteger = 3
      TypeFloat = 4
      TypeDecimal = 5
      TypeDouble = 6
      TypeBoolean = 7
      TypeBase64 = 8
      def __init__(self, category, content_type, name, value):
          self.category = category
          self.content_type = content_type
          self.name = name
          self.value = value
      def getCategory(self):
          return self.category
      def getContenttype(self, content_type):
          return self.content_type
      def getValue(self):
          return self.value
      def getName(self):
          return self.name
      def export(self, outfile, level, name, namespace, pretty_print=True):
          if self.category == MixedContainer.CategoryText:
              # Prevent exporting empty content as empty lines.
              if self.value.strip():
                  outfile.write(self.value)
          elif self.category == MixedContainer.CategorySimple:
              self.exportSimple(outfile, level, name)
          else:    # category == MixedContainer.CategoryComplex
              self.value.export(
                  outfile, level, namespace, name, pretty_print=pretty_print)
      def exportSimple(self, outfile, level, name):
          if self.content_type == MixedContainer.TypeString:
              outfile.write('<%s>%s</%s>' % (
                  self.name, self.value, self.name))
          elif self.content_type == MixedContainer.TypeInteger or \
                  self.content_type == MixedContainer.TypeBoolean:
              outfile.write('<%s>%d</%s>' % (
                  self.name, self.value, self.name))
          elif self.content_type == MixedContainer.TypeFloat or \
                  self.content_type == MixedContainer.TypeDecimal:
              outfile.write('<%s>%f</%s>' % (
                  self.name, self.value, self.name))
          elif self.content_type == MixedContainer.TypeDouble:
              outfile.write('<%s>%g</%s>' % (
                  self.name, self.value, self.name))
          elif self.content_type == MixedContainer.TypeBase64:
              outfile.write('<%s>%s</%s>' % (
                  self.name, base64.b64encode(self.value), self.name))
      def to_etree(self, element):
          if self.category == MixedContainer.CategoryText:
              # Prevent exporting empty content as empty lines.
              if self.value.strip():
                  if len(element) > 0:
                      if element[-1].tail is None:
                          element[-1].tail = self.value
                      else:
                          element[-1].tail += self.value
                  else:
                      if element.text is None:
                          element.text = self.value
                      else:
                          element.text += self.value
          elif self.category == MixedContainer.CategorySimple:
              subelement = etree_.SubElement(element, '%s' % self.name)
              subelement.text = self.to_etree_simple()
          else:    # category == MixedContainer.CategoryComplex
              self.value.to_etree(element)
      def to_etree_simple(self):
          if self.content_type == MixedContainer.TypeString:
              text = self.value
          elif (self.content_type == MixedContainer.TypeInteger or
                  self.content_type == MixedContainer.TypeBoolean):
              text = '%d' % self.value
          elif (self.content_type == MixedContainer.TypeFloat or
                  self.content_type == MixedContainer.TypeDecimal):
              text = '%f' % self.value
          elif self.content_type == MixedContainer.TypeDouble:
              text = '%g' % self.value
          elif self.content_type == MixedContainer.TypeBase64:
              text = '%s' % base64.b64encode(self.value)
          return text
      def exportLiteral(self, outfile, level, name):
          if self.category == MixedContainer.CategoryText:
              showIndent(outfile, level)
              outfile.write(
                  'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
                      self.category, self.content_type, self.name, self.value))
          elif self.category == MixedContainer.CategorySimple:
              showIndent(outfile, level)
              outfile.write(
                  'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
                      self.category, self.content_type, self.name, self.value))
          else:    # category == MixedContainer.CategoryComplex
              showIndent(outfile, level)
              outfile.write(
                  'model_.MixedContainer(%d, %d, "%s",\n' % (
                      self.category, self.content_type, self.name,))
              self.value.exportLiteral(outfile, level + 1)
              showIndent(outfile, level)
              outfile.write(')\n')
  
  
  class MemberSpec_(object):
      def __init__(self, name='', data_type='', container=0):
          self.name = name
          self.data_type = data_type
          self.container = container
      def set_name(self, name): self.name = name
      def get_name(self): return self.name
      def set_data_type(self, data_type): self.data_type = data_type
      def get_data_type_chain(self): return self.data_type
      def get_data_type(self):
          if isinstance(self.data_type, list):
              if len(self.data_type) > 0:
                  return self.data_type[-1]
              else:
                  return 'xs:string'
          else:
              return self.data_type
      def set_container(self, container): self.container = container
      def get_container(self): return self.container
  
  
  def _cast(typ, value):
      if typ is None or value is None:
          return value
      return typ(value)
  
  #
  # Data representation classes.
  #
  
  
  class people(GeneratedsSuper):
      """A list of people."""
      member_data_items_ = [
          MemberSpec_('comments', 'comments', 1),
          MemberSpec_('person', 'person', 1),
          MemberSpec_('specialperson', 'specialperson', 1),
          MemberSpec_('programmer', 'programmer', 1),
          MemberSpec_('python_programmer', 'python-programmer', 1),
          MemberSpec_('java_programmer', 'java-programmer', 1),
      ]
      subclass = None
      superclass = None
      def __init__(self, comments=None, person=None, specialperson=None, programmer=None, python_programmer=None, java_programmer=None):
          self.original_tagname_ = None
          if comments is None:
              self.comments = []
          else:
              self.comments = comments
          if person is None:
              self.person = []
          else:
              self.person = person
          if specialperson is None:
              self.specialperson = []
          else:
              self.specialperson = specialperson
          if programmer is None:
              self.programmer = []
          else:
              self.programmer = programmer
          if python_programmer is None:
              self.python_programmer = []
          else:
              self.python_programmer = python_programmer
          if java_programmer is None:
              self.java_programmer = []
          else:
              self.java_programmer = java_programmer
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, people)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if people.subclass:
              return people.subclass(*args_, **kwargs_)
          else:
              return people(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_comments(self): return self.comments
      def set_comments(self, comments): self.comments = comments
      def add_comments(self, value): self.comments.append(value)
      def insert_comments_at(self, index, value): self.comments.insert(index, value)
      def replace_comments_at(self, index, value): self.comments[index] = value
      def get_person(self): return self.person
      def set_person(self, person): self.person = person
      def add_person(self, value): self.person.append(value)
      def insert_person_at(self, index, value): self.person.insert(index, value)
      def replace_person_at(self, index, value): self.person[index] = value
      def get_specialperson(self): return self.specialperson
      def set_specialperson(self, specialperson): self.specialperson = specialperson
      def add_specialperson(self, value): self.specialperson.append(value)
      def insert_specialperson_at(self, index, value): self.specialperson.insert(index, value)
      def replace_specialperson_at(self, index, value): self.specialperson[index] = value
      def get_programmer(self): return self.programmer
      def set_programmer(self, programmer): self.programmer = programmer
      def add_programmer(self, value): self.programmer.append(value)
      def insert_programmer_at(self, index, value): self.programmer.insert(index, value)
      def replace_programmer_at(self, index, value): self.programmer[index] = value
      def get_python_programmer(self): return self.python_programmer
      def set_python_programmer(self, python_programmer): self.python_programmer = python_programmer
      def add_python_programmer(self, value): self.python_programmer.append(value)
      def insert_python_programmer_at(self, index, value): self.python_programmer.insert(index, value)
      def replace_python_programmer_at(self, index, value): self.python_programmer[index] = value
      def get_java_programmer(self): return self.java_programmer
      def set_java_programmer(self, java_programmer): self.java_programmer = java_programmer
      def add_java_programmer(self, value): self.java_programmer.append(value)
      def insert_java_programmer_at(self, index, value): self.java_programmer.insert(index, value)
      def replace_java_programmer_at(self, index, value): self.java_programmer[index] = value
      def hasContent_(self):
          if (
              self.comments or
              self.person or
              self.specialperson or
              self.programmer or
              self.python_programmer or
              self.java_programmer
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='people', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='people')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='people', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='people'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='people', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          for comments_ in self.comments:
              comments_.export(outfile, level, namespace_, name_='comments', pretty_print=pretty_print)
          for person_ in self.person:
              person_.export(outfile, level, namespace_, name_='person', pretty_print=pretty_print)
          for specialperson_ in self.specialperson:
              specialperson_.export(outfile, level, namespace_, name_='specialperson', pretty_print=pretty_print)
          for programmer_ in self.programmer:
              programmer_.export(outfile, level, namespace_, name_='programmer', pretty_print=pretty_print)
          for python_programmer_ in self.python_programmer:
              python_programmer_.export(outfile, level, namespace_, name_='python-programmer', pretty_print=pretty_print)
          for java_programmer_ in self.java_programmer:
              java_programmer_.export(outfile, level, namespace_, name_='java-programmer', pretty_print=pretty_print)
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'comments':
              obj_ = comments.factory()
              obj_.build(child_)
              self.comments.append(obj_)
              obj_.original_tagname_ = 'comments'
          elif nodeName_ == 'person':
              class_obj_ = self.get_class_obj_(child_, person)
              obj_ = class_obj_.factory()
              obj_.build(child_)
              self.person.append(obj_)
              obj_.original_tagname_ = 'person'
          elif nodeName_ == 'specialperson':
              obj_ = specialperson.factory()
              obj_.build(child_)
              self.specialperson.append(obj_)
              obj_.original_tagname_ = 'specialperson'
          elif nodeName_ == 'programmer':
              class_obj_ = self.get_class_obj_(child_, programmer)
              obj_ = class_obj_.factory()
              obj_.build(child_)
              self.programmer.append(obj_)
              obj_.original_tagname_ = 'programmer'
          elif nodeName_ == 'python-programmer':
              obj_ = python_programmer.factory()
              obj_.build(child_)
              self.python_programmer.append(obj_)
              obj_.original_tagname_ = 'python-programmer'
          elif nodeName_ == 'java-programmer':
              obj_ = java_programmer.factory()
              obj_.build(child_)
              self.java_programmer.append(obj_)
              obj_.original_tagname_ = 'java-programmer'
  # end class people
  
  
  class comments(GeneratedsSuper):
      member_data_items_ = [
          MemberSpec_('emp', 'xs:string', 1),
          MemberSpec_('bold', 'xs:string', 1),
          MemberSpec_('valueOf_', [], 0),
      ]
      subclass = None
      superclass = None
      def __init__(self, emp=None, bold=None, valueOf_=None, mixedclass_=None, content_=None):
          self.original_tagname_ = None
          if emp is None:
              self.emp = []
          else:
              self.emp = emp
          if bold is None:
              self.bold = []
          else:
              self.bold = bold
          self.valueOf_ = valueOf_
          if mixedclass_ is None:
              self.mixedclass_ = MixedContainer
          else:
              self.mixedclass_ = mixedclass_
          if content_ is None:
              self.content_ = []
          else:
              self.content_ = content_
          self.valueOf_ = valueOf_
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, comments)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if comments.subclass:
              return comments.subclass(*args_, **kwargs_)
          else:
              return comments(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_emp(self): return self.emp
      def set_emp(self, emp): self.emp = emp
      def add_emp(self, value): self.emp.append(value)
      def insert_emp_at(self, index, value): self.emp.insert(index, value)
      def replace_emp_at(self, index, value): self.emp[index] = value
      def get_bold(self): return self.bold
      def set_bold(self, bold): self.bold = bold
      def add_bold(self, value): self.bold.append(value)
      def insert_bold_at(self, index, value): self.bold.insert(index, value)
      def replace_bold_at(self, index, value): self.bold[index] = value
      def get_valueOf_(self): return self.valueOf_
      def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
      def hasContent_(self):
          if (
              self.emp or
              self.bold or
              1 if type(self.valueOf_) in [int,float] else self.valueOf_
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='comments', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='comments')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='comments', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='comments'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='comments', fromsubclass_=False, pretty_print=True):
          if not fromsubclass_:
              for item_ in self.content_:
                  item_.export(outfile, level, item_.name, namespace_, pretty_print=pretty_print)
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          self.valueOf_ = get_all_text_(node)
          if node.text is not None:
              obj_ = self.mixedclass_(MixedContainer.CategoryText,
                  MixedContainer.TypeNone, '', node.text)
              self.content_.append(obj_)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'emp' and child_.text is not None:
              valuestr_ = child_.text
              obj_ = self.mixedclass_(MixedContainer.CategorySimple,
                  MixedContainer.TypeString, 'emp', valuestr_)
              self.content_.append(obj_)
          elif nodeName_ == 'bold' and child_.text is not None:
              valuestr_ = child_.text
              obj_ = self.mixedclass_(MixedContainer.CategorySimple,
                  MixedContainer.TypeString, 'bold', valuestr_)
              self.content_.append(obj_)
          if not fromsubclass_ and child_.tail is not None:
              obj_ = self.mixedclass_(MixedContainer.CategoryText,
                  MixedContainer.TypeNone, '', child_.tail)
              self.content_.append(obj_)
  # end class comments
  
  
  class person(GeneratedsSuper):
      """A generic person. This is the base for a number of different kinds
      of people. They are each an extension of this base type of
      person."""
      member_data_items_ = [
          MemberSpec_('value', 'xs:string', 0),
          MemberSpec_('id', 'xs:integer', 0),
          MemberSpec_('ratio', 'xs:float', 0),
          MemberSpec_('fruit', 'xs:string', 0),
          MemberSpec_('vegetable', 'xs:string', 0),
          MemberSpec_('name', 'xs:string', 0),
          MemberSpec_('interest', 'xs:string', 1),
          MemberSpec_('category', 'xs:integer', 0),
          MemberSpec_('agent', 'agent', 1),
          MemberSpec_('promoter', 'booster', 1),
          MemberSpec_('description', 'xs:string', 0),
      ]
      subclass = None
      superclass = None
      def __init__(self, value=None, id=None, ratio=None, fruit=None, vegetable=None, name=None, interest=None, category=None, agent=None, promoter=None, description=None, extensiontype_=None):
          self.original_tagname_ = None
          self.value = _cast(None, value)
          self.id = _cast(int, id)
          self.ratio = _cast(float, ratio)
          self.fruit = _cast(None, fruit)
          self.vegetable = _cast(None, vegetable)
          self.name = name
          if interest is None:
              self.interest = []
          else:
              self.interest = interest
          self.category = category
          if agent is None:
              self.agent = []
          else:
              self.agent = agent
          if promoter is None:
              self.promoter = []
          else:
              self.promoter = promoter
          self.description = description
          self.extensiontype_ = extensiontype_
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, person)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if person.subclass:
              return person.subclass(*args_, **kwargs_)
          else:
              return person(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_name(self): return self.name
      def set_name(self, name): self.name = name
      def get_interest(self): return self.interest
      def set_interest(self, interest): self.interest = interest
      def add_interest(self, value): self.interest.append(value)
      def insert_interest_at(self, index, value): self.interest.insert(index, value)
      def replace_interest_at(self, index, value): self.interest[index] = value
      def get_category(self): return self.category
      def set_category(self, category): self.category = category
      def get_agent(self): return self.agent
      def set_agent(self, agent): self.agent = agent
      def add_agent(self, value): self.agent.append(value)
      def insert_agent_at(self, index, value): self.agent.insert(index, value)
      def replace_agent_at(self, index, value): self.agent[index] = value
      def get_promoter(self): return self.promoter
      def set_promoter(self, promoter): self.promoter = promoter
      def add_promoter(self, value): self.promoter.append(value)
      def insert_promoter_at(self, index, value): self.promoter.insert(index, value)
      def replace_promoter_at(self, index, value): self.promoter[index] = value
      def get_description(self): return self.description
      def set_description(self, description): self.description = description
      def get_value(self): return self.value
      def set_value(self, value): self.value = value
      def get_id(self): return self.id
      def set_id(self, id): self.id = id
      def get_ratio(self): return self.ratio
      def set_ratio(self, ratio): self.ratio = ratio
      def get_fruit(self): return self.fruit
      def set_fruit(self, fruit): self.fruit = fruit
      def get_vegetable(self): return self.vegetable
      def set_vegetable(self, vegetable): self.vegetable = vegetable
      def get_extensiontype_(self): return self.extensiontype_
      def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
      def hasContent_(self):
          if (
              self.name is not None or
              self.interest or
              self.category is not None or
              self.agent or
              self.promoter or
              self.description is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='person', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='person')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='person', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='person'):
          if self.value is not None and 'value' not in already_processed:
              already_processed.add('value')
              outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), ))
          if self.id is not None and 'id' not in already_processed:
              already_processed.add('id')
              outfile.write(' id="%s"' % self.gds_format_integer(self.id, input_name='id'))
          if self.ratio is not None and 'ratio' not in already_processed:
              already_processed.add('ratio')
              outfile.write(' ratio="%s"' % self.gds_format_float(self.ratio, input_name='ratio'))
          if self.fruit is not None and 'fruit' not in already_processed:
              already_processed.add('fruit')
              outfile.write(' fruit=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.fruit), input_name='fruit')), ))
          if self.vegetable is not None and 'vegetable' not in already_processed:
              already_processed.add('vegetable')
              outfile.write(' vegetable=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.vegetable), input_name='vegetable')), ))
          if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
              already_processed.add('xsi:type')
              outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
              outfile.write(' xsi:type="%s"' % self.extensiontype_)
      def exportChildren(self, outfile, level, namespace_='', name_='person', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.name is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sname>%s</%sname>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.name), input_name='name')), namespace_, eol_))
          for interest_ in self.interest:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sinterest>%s</%sinterest>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(interest_), input_name='interest')), namespace_, eol_))
          if self.category is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%scategory>%s</%scategory>%s' % (namespace_, self.gds_format_integer(self.category, input_name='category'), namespace_, eol_))
          for agent_ in self.agent:
              agent_.export(outfile, level, namespace_, name_='agent', pretty_print=pretty_print)
          for promoter_ in self.promoter:
              promoter_.export(outfile, level, namespace_, name_='promoter', pretty_print=pretty_print)
          if self.description is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sdescription>%s</%sdescription>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.description), input_name='description')), namespace_, eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          value = find_attr_value_('value', node)
          if value is not None and 'value' not in already_processed:
              already_processed.add('value')
              self.value = value
          value = find_attr_value_('id', node)
          if value is not None and 'id' not in already_processed:
              already_processed.add('id')
              try:
                  self.id = int(value)
              except ValueError as exp:
                  raise_parse_error(node, 'Bad integer attribute: %s' % exp)
          value = find_attr_value_('ratio', node)
          if value is not None and 'ratio' not in already_processed:
              already_processed.add('ratio')
              try:
                  self.ratio = float(value)
              except ValueError as exp:
                  raise ValueError('Bad float/double attribute (ratio): %s' % exp)
          value = find_attr_value_('fruit', node)
          if value is not None and 'fruit' not in already_processed:
              already_processed.add('fruit')
              self.fruit = value
          value = find_attr_value_('vegetable', node)
          if value is not None and 'vegetable' not in already_processed:
              already_processed.add('vegetable')
              self.vegetable = value
          value = find_attr_value_('xsi:type', node)
          if value is not None and 'xsi:type' not in already_processed:
              already_processed.add('xsi:type')
              self.extensiontype_ = value
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'name':
              name_ = child_.text
              name_ = self.gds_validate_string(name_, node, 'name')
              self.name = name_
          elif nodeName_ == 'interest':
              interest_ = child_.text
              interest_ = self.gds_validate_string(interest_, node, 'interest')
              self.interest.append(interest_)
          elif nodeName_ == 'category':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              ival_ = self.gds_validate_integer(ival_, node, 'category')
              self.category = ival_
          elif nodeName_ == 'agent':
              obj_ = agent.factory()
              obj_.build(child_)
              self.agent.append(obj_)
              obj_.original_tagname_ = 'agent'
          elif nodeName_ == 'promoter':
              obj_ = booster.factory()
              obj_.build(child_)
              self.promoter.append(obj_)
              obj_.original_tagname_ = 'promoter'
          elif nodeName_ == 'description':
              description_ = child_.text
              description_ = self.gds_validate_string(description_, node, 'description')
              self.description = description_
  # end class person
  
  
  class specialperson(person):
      member_data_items_ = [
      ]
      subclass = None
      superclass = person
      def __init__(self, value=None, id=None, ratio=None, fruit=None, vegetable=None, name=None, interest=None, category=None, agent=None, promoter=None, description=None):
          self.original_tagname_ = None
          super(specialperson, self).__init__(value, id, ratio, fruit, vegetable, name, interest, category, agent, promoter, description, )
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, specialperson)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if specialperson.subclass:
              return specialperson.subclass(*args_, **kwargs_)
          else:
              return specialperson(*args_, **kwargs_)
      factory = staticmethod(factory)
      def hasContent_(self):
          if (
              super(specialperson, self).hasContent_()
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='specialperson', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='specialperson')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='specialperson', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='specialperson'):
          super(specialperson, self).exportAttributes(outfile, level, already_processed, namespace_, name_='specialperson')
      def exportChildren(self, outfile, level, namespace_='', name_='specialperson', fromsubclass_=False, pretty_print=True):
          super(specialperson, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          super(specialperson, self).buildAttributes(node, attrs, already_processed)
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          super(specialperson, self).buildChildren(child_, node, nodeName_, True)
          pass
  # end class specialperson
  
  
  class param(GeneratedsSuper):
      """Finding flow attribute unneccesary in practice. A unnamed parameter
      is unbound/skipped."""
      member_data_items_ = [
          MemberSpec_('id', 'xs:string', 0),
          MemberSpec_('name', 'xs:NCName', 0),
          MemberSpec_('sid', 'xs:NCName', 0),
          MemberSpec_('flow', 'FlowType', 0),
          MemberSpec_('semantic', 'xs:token', 0),
          MemberSpec_('type', 'xs:NMTOKEN', 0),
          MemberSpec_('valueOf_', 'xs:string', 0),
      ]
      subclass = None
      superclass = None
      def __init__(self, id=None, name=None, sid=None, flow=None, semantic=None, type_=None, valueOf_=None):
          self.original_tagname_ = None
          self.id = _cast(None, id)
          self.name = _cast(None, name)
          self.sid = _cast(None, sid)
          self.flow = _cast(None, flow)
          self.semantic = _cast(None, semantic)
          self.type_ = _cast(None, type_)
          self.valueOf_ = valueOf_
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, param)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if param.subclass:
              return param.subclass(*args_, **kwargs_)
          else:
              return param(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_id(self): return self.id
      def set_id(self, id): self.id = id
      def get_name(self): return self.name
      def set_name(self, name): self.name = name
      def get_sid(self): return self.sid
      def set_sid(self, sid): self.sid = sid
      def get_flow(self): return self.flow
      def set_flow(self, flow): self.flow = flow
      def get_semantic(self): return self.semantic
      def set_semantic(self, semantic): self.semantic = semantic
      def get_type(self): return self.type_
      def set_type(self, type_): self.type_ = type_
      def get_valueOf_(self): return self.valueOf_
      def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
      def hasContent_(self):
          if (
              1 if type(self.valueOf_) in [int,float] else self.valueOf_
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='param', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='param')
          if self.hasContent_():
              outfile.write('>')
              outfile.write((quote_xml(self.valueOf_) if type(self.valueOf_) is str else self.gds_encode(str(self.valueOf_))))
              self.exportChildren(outfile, level + 1, namespace_='', name_='param', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='param'):
          if self.id is not None and 'id' not in already_processed:
              already_processed.add('id')
              outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
          if self.name is not None and 'name' not in already_processed:
              already_processed.add('name')
              outfile.write(' name=%s' % (quote_attrib(self.name), ))
          if self.sid is not None and 'sid' not in already_processed:
              already_processed.add('sid')
              outfile.write(' sid=%s' % (quote_attrib(self.sid), ))
          if self.flow is not None and 'flow' not in already_processed:
              already_processed.add('flow')
              outfile.write(' flow=%s' % (quote_attrib(self.flow), ))
          if self.semantic is not None and 'semantic' not in already_processed:
              already_processed.add('semantic')
              outfile.write(' semantic=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.semantic), input_name='semantic')), ))
          if self.type_ is not None and 'type_' not in already_processed:
              already_processed.add('type_')
              outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), ))
      def exportChildren(self, outfile, level, namespace_='', name_='param', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          self.valueOf_ = get_all_text_(node)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          value = find_attr_value_('id', node)
          if value is not None and 'id' not in already_processed:
              already_processed.add('id')
              self.id = value
          value = find_attr_value_('name', node)
          if value is not None and 'name' not in already_processed:
              already_processed.add('name')
              self.name = value
          value = find_attr_value_('sid', node)
          if value is not None and 'sid' not in already_processed:
              already_processed.add('sid')
              self.sid = value
          value = find_attr_value_('flow', node)
          if value is not None and 'flow' not in already_processed:
              already_processed.add('flow')
              self.flow = value
          value = find_attr_value_('semantic', node)
          if value is not None and 'semantic' not in already_processed:
              already_processed.add('semantic')
              self.semantic = value
              self.semantic = ' '.join(self.semantic.split())
          value = find_attr_value_('type', node)
          if value is not None and 'type' not in already_processed:
              already_processed.add('type')
              self.type_ = value
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class param
  
  
  class agent(GeneratedsSuper):
      member_data_items_ = [
          MemberSpec_('firstname', 'xs:string', 0),
          MemberSpec_('lastname', 'xs:string', 0),
          MemberSpec_('priority', 'xs:float', 0),
          MemberSpec_('info', 'info', 0),
          MemberSpec_('vehicle', 'vehicle', 1),
      ]
      subclass = None
      superclass = None
      def __init__(self, firstname=None, lastname=None, priority=None, info=None, vehicle=None):
          self.original_tagname_ = None
          self.firstname = firstname
          self.lastname = lastname
          self.priority = priority
          self.info = info
          if vehicle is None:
              self.vehicle = []
          else:
              self.vehicle = vehicle
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, agent)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if agent.subclass:
              return agent.subclass(*args_, **kwargs_)
          else:
              return agent(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_firstname(self): return self.firstname
      def set_firstname(self, firstname): self.firstname = firstname
      def get_lastname(self): return self.lastname
      def set_lastname(self, lastname): self.lastname = lastname
      def get_priority(self): return self.priority
      def set_priority(self, priority): self.priority = priority
      def get_info(self): return self.info
      def set_info(self, info): self.info = info
      def get_vehicle(self): return self.vehicle
      def set_vehicle(self, vehicle): self.vehicle = vehicle
      def add_vehicle(self, value): self.vehicle.append(value)
      def insert_vehicle_at(self, index, value): self.vehicle.insert(index, value)
      def replace_vehicle_at(self, index, value): self.vehicle[index] = value
      def hasContent_(self):
          if (
              self.firstname is not None or
              self.lastname is not None or
              self.priority is not None or
              self.info is not None or
              self.vehicle
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='agent', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='agent')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='agent', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='agent'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='agent', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.firstname is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sfirstname>%s</%sfirstname>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.firstname), input_name='firstname')), namespace_, eol_))
          if self.lastname is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%slastname>%s</%slastname>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.lastname), input_name='lastname')), namespace_, eol_))
          if self.priority is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%spriority>%s</%spriority>%s' % (namespace_, self.gds_format_float(self.priority, input_name='priority'), namespace_, eol_))
          if self.info is not None:
              self.info.export(outfile, level, namespace_, name_='info', pretty_print=pretty_print)
          for vehicle_ in self.vehicle:
              vehicle_.export(outfile, level, namespace_, name_='vehicle', pretty_print=pretty_print)
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'firstname':
              firstname_ = child_.text
              firstname_ = self.gds_validate_string(firstname_, node, 'firstname')
              self.firstname = firstname_
          elif nodeName_ == 'lastname':
              lastname_ = child_.text
              lastname_ = self.gds_validate_string(lastname_, node, 'lastname')
              self.lastname = lastname_
          elif nodeName_ == 'priority':
              sval_ = child_.text
              try:
                  fval_ = float(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires float or double: %s' % exp)
              fval_ = self.gds_validate_float(fval_, node, 'priority')
              self.priority = fval_
          elif nodeName_ == 'info':
              obj_ = info.factory()
              obj_.build(child_)
              self.info = obj_
              obj_.original_tagname_ = 'info'
          elif nodeName_ == 'vehicle':
              type_name_ = child_.attrib.get(
                  '{http://www.w3.org/2001/XMLSchema-instance}type')
              if type_name_ is None:
                  type_name_ = child_.attrib.get('type')
              if type_name_ is not None:
                  type_names_ = type_name_.split(':')
                  if len(type_names_) == 1:
                      type_name_ = type_names_[0]
                  else:
                      type_name_ = type_names_[1]
                  class_ = globals()[type_name_]
                  obj_ = class_.factory()
                  obj_.build(child_)
              else:
                  raise NotImplementedError(
                      'Class not implemented for <vehicle> element')
              self.vehicle.append(obj_)
              obj_.original_tagname_ = 'vehicle'
  # end class agent
  
  
  class special_agent(GeneratedsSuper):
      """This is a good kind of agent for testing the generation of Python
      bindings for an XML schema."""
      member_data_items_ = [
          MemberSpec_('firstname', 'xs:string', 0),
          MemberSpec_('lastname', 'xs:string', 0),
          MemberSpec_('priority', 'xs:float', 0),
          MemberSpec_('info', 'info', 0),
      ]
      subclass = None
      superclass = None
      def __init__(self, firstname=None, lastname=None, priority=None, info=None):
          self.original_tagname_ = None
          self.firstname = firstname
          self.lastname = lastname
          self.priority = priority
          self.info = info
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, special_agent)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if special_agent.subclass:
              return special_agent.subclass(*args_, **kwargs_)
          else:
              return special_agent(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_firstname(self): return self.firstname
      def set_firstname(self, firstname): self.firstname = firstname
      def get_lastname(self): return self.lastname
      def set_lastname(self, lastname): self.lastname = lastname
      def get_priority(self): return self.priority
      def set_priority(self, priority): self.priority = priority
      def get_info(self): return self.info
      def set_info(self, info): self.info = info
      def hasContent_(self):
          if (
              self.firstname is not None or
              self.lastname is not None or
              self.priority is not None or
              self.info is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='special-agent', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='special-agent')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='special-agent', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='special-agent'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='special-agent', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.firstname is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sfirstname>%s</%sfirstname>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.firstname), input_name='firstname')), namespace_, eol_))
          if self.lastname is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%slastname>%s</%slastname>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.lastname), input_name='lastname')), namespace_, eol_))
          if self.priority is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%spriority>%s</%spriority>%s' % (namespace_, self.gds_format_float(self.priority, input_name='priority'), namespace_, eol_))
          if self.info is not None:
              self.info.export(outfile, level, namespace_, name_='info', pretty_print=pretty_print)
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'firstname':
              firstname_ = child_.text
              firstname_ = self.gds_validate_string(firstname_, node, 'firstname')
              self.firstname = firstname_
          elif nodeName_ == 'lastname':
              lastname_ = child_.text
              lastname_ = self.gds_validate_string(lastname_, node, 'lastname')
              self.lastname = lastname_
          elif nodeName_ == 'priority':
              sval_ = child_.text
              try:
                  fval_ = float(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires float or double: %s' % exp)
              fval_ = self.gds_validate_float(fval_, node, 'priority')
              self.priority = fval_
          elif nodeName_ == 'info':
              obj_ = info.factory()
              obj_.build(child_)
              self.info = obj_
              obj_.original_tagname_ = 'info'
  # end class special_agent
  
  
  class booster(GeneratedsSuper):
      member_data_items_ = [
          MemberSpec_('member-id', 'xs:string', 0),
          MemberSpec_('firstname', 'xs:string', 0),
          MemberSpec_('lastname', 'xs:string', 0),
          MemberSpec_('other_name', 'xs:float', 0),
          MemberSpec_('class_', 'xs:float', 0),
          MemberSpec_('other_value', 'xs:float', 1),
          MemberSpec_('type_', 'xs:float', 1),
          MemberSpec_('client_handler', 'client-handlerType', 1),
      ]
      subclass = None
      superclass = None
      def __init__(self, member_id=None, firstname=None, lastname=None, other_name=None, class_=None, other_value=None, type_=None, client_handler=None):
          self.original_tagname_ = None
          self.member_id = _cast(None, member_id)
          self.firstname = firstname
          self.lastname = lastname
          self.other_name = other_name
          self.class_ = class_
          if other_value is None:
              self.other_value = []
          else:
              self.other_value = other_value
          if type_ is None:
              self.type_ = []
          else:
              self.type_ = type_
          if client_handler is None:
              self.client_handler = []
          else:
              self.client_handler = client_handler
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, booster)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if booster.subclass:
              return booster.subclass(*args_, **kwargs_)
          else:
              return booster(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_firstname(self): return self.firstname
      def set_firstname(self, firstname): self.firstname = firstname
      def get_lastname(self): return self.lastname
      def set_lastname(self, lastname): self.lastname = lastname
      def get_other_name(self): return self.other_name
      def set_other_name(self, other_name): self.other_name = other_name
      def get_class(self): return self.class_
      def set_class(self, class_): self.class_ = class_
      def get_other_value(self): return self.other_value
      def set_other_value(self, other_value): self.other_value = other_value
      def add_other_value(self, value): self.other_value.append(value)
      def insert_other_value_at(self, index, value): self.other_value.insert(index, value)
      def replace_other_value_at(self, index, value): self.other_value[index] = value
      def get_type(self): return self.type_
      def set_type(self, type_): self.type_ = type_
      def add_type(self, value): self.type_.append(value)
      def insert_type_at(self, index, value): self.type_.insert(index, value)
      def replace_type_at(self, index, value): self.type_[index] = value
      def get_client_handler(self): return self.client_handler
      def set_client_handler(self, client_handler): self.client_handler = client_handler
      def add_client_handler(self, value): self.client_handler.append(value)
      def insert_client_handler_at(self, index, value): self.client_handler.insert(index, value)
      def replace_client_handler_at(self, index, value): self.client_handler[index] = value
      def get_member_id(self): return self.member_id
      def set_member_id(self, member_id): self.member_id = member_id
      def hasContent_(self):
          if (
              self.firstname is not None or
              self.lastname is not None or
              self.other_name is not None or
              self.class_ is not None or
              self.other_value or
              self.type_ or
              self.client_handler
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='booster', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='booster')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='booster', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='booster'):
          if self.member_id is not None and 'member_id' not in already_processed:
              already_processed.add('member_id')
              outfile.write(' member-id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.member_id), input_name='member-id')), ))
      def exportChildren(self, outfile, level, namespace_='', name_='booster', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.firstname is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sfirstname>%s</%sfirstname>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.firstname), input_name='firstname')), namespace_, eol_))
          if self.lastname is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%slastname>%s</%slastname>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.lastname), input_name='lastname')), namespace_, eol_))
          if self.other_name is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sother-name>%s</%sother-name>%s' % (namespace_, self.gds_format_float(self.other_name, input_name='other-name'), namespace_, eol_))
          if self.class_ is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sclass>%s</%sclass>%s' % (namespace_, self.gds_format_float(self.class_, input_name='class'), namespace_, eol_))
          for other_value_ in self.other_value:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sother-value>%s</%sother-value>%s' % (namespace_, self.gds_format_float(other_value_, input_name='other-value'), namespace_, eol_))
          for type_ in self.type_:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%stype>%s</%stype>%s' % (namespace_, self.gds_format_float(type_, input_name='type'), namespace_, eol_))
          for client_handler_ in self.client_handler:
              client_handler_.export(outfile, level, namespace_, name_='client-handler', pretty_print=pretty_print)
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          value = find_attr_value_('member-id', node)
          if value is not None and 'member-id' not in already_processed:
              already_processed.add('member-id')
              self.member_id = value
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'firstname':
              firstname_ = child_.text
              firstname_ = self.gds_validate_string(firstname_, node, 'firstname')
              self.firstname = firstname_
          elif nodeName_ == 'lastname':
              lastname_ = child_.text
              lastname_ = self.gds_validate_string(lastname_, node, 'lastname')
              self.lastname = lastname_
          elif nodeName_ == 'other-name':
              sval_ = child_.text
              try:
                  fval_ = float(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires float or double: %s' % exp)
              fval_ = self.gds_validate_float(fval_, node, 'other_name')
              self.other_name = fval_
          elif nodeName_ == 'class':
              sval_ = child_.text
              try:
                  fval_ = float(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires float or double: %s' % exp)
              fval_ = self.gds_validate_float(fval_, node, 'class')
              self.class_ = fval_
          elif nodeName_ == 'other-value':
              sval_ = child_.text
              try:
                  fval_ = float(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires float or double: %s' % exp)
              fval_ = self.gds_validate_float(fval_, node, 'other_value')
              self.other_value.append(fval_)
          elif nodeName_ == 'type':
              sval_ = child_.text
              try:
                  fval_ = float(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires float or double: %s' % exp)
              fval_ = self.gds_validate_float(fval_, node, 'type')
              self.type_.append(fval_)
          elif nodeName_ == 'client-handler':
              obj_ = client_handlerType.factory()
              obj_.build(child_)
              self.client_handler.append(obj_)
              obj_.original_tagname_ = 'client-handler'
  # end class booster
  
  
  class info(GeneratedsSuper):
      member_data_items_ = [
          MemberSpec_('name', 'xs:string', 0),
          MemberSpec_('type', 'xs:integer', 0),
          MemberSpec_('rating', 'xs:float', 0),
      ]
      subclass = None
      superclass = None
      def __init__(self, name=None, type_=None, rating=None):
          self.original_tagname_ = None
          self.name = _cast(None, name)
          self.type_ = _cast(int, type_)
          self.rating = _cast(float, rating)
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, info)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if info.subclass:
              return info.subclass(*args_, **kwargs_)
          else:
              return info(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_name(self): return self.name
      def set_name(self, name): self.name = name
      def get_type(self): return self.type_
      def set_type(self, type_): self.type_ = type_
      def get_rating(self): return self.rating
      def set_rating(self, rating): self.rating = rating
      def hasContent_(self):
          if (
  
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='info', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='info')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='info', pretty_print=pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='info'):
          if self.name is not None and 'name' not in already_processed:
              already_processed.add('name')
              outfile.write(' name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.name), input_name='name')), ))
          if self.type_ is not None and 'type_' not in already_processed:
              already_processed.add('type_')
              outfile.write(' type="%s"' % self.gds_format_integer(self.type_, input_name='type'))
          if self.rating is not None and 'rating' not in already_processed:
              already_processed.add('rating')
              outfile.write(' rating="%s"' % self.gds_format_float(self.rating, input_name='rating'))
      def exportChildren(self, outfile, level, namespace_='', name_='info', fromsubclass_=False, pretty_print=True):
          pass
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          value = find_attr_value_('name', node)
          if value is not None and 'name' not in already_processed:
              already_processed.add('name')
              self.name = value
          value = find_attr_value_('type', node)
          if value is not None and 'type' not in already_processed:
              already_processed.add('type')
              try:
                  self.type_ = int(value)
              except ValueError as exp:
                  raise_parse_error(node, 'Bad integer attribute: %s' % exp)
          value = find_attr_value_('rating', node)
          if value is not None and 'rating' not in already_processed:
              already_processed.add('rating')
              try:
                  self.rating = float(value)
              except ValueError as exp:
                  raise ValueError('Bad float/double attribute (rating): %s' % exp)
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          pass
  # end class info
  
  
  class vehicle(GeneratedsSuper):
      member_data_items_ = [
          MemberSpec_('wheelcount', 'xs:integer', 0),
      ]
      subclass = None
      superclass = None
      def __init__(self, wheelcount=None, extensiontype_=None):
          self.original_tagname_ = None
          self.wheelcount = wheelcount
          self.extensiontype_ = extensiontype_
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, vehicle)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if vehicle.subclass:
              return vehicle.subclass(*args_, **kwargs_)
          else:
              return vehicle(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_wheelcount(self): return self.wheelcount
      def set_wheelcount(self, wheelcount): self.wheelcount = wheelcount
      def get_extensiontype_(self): return self.extensiontype_
      def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
      def hasContent_(self):
          if (
              self.wheelcount is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='vehicle', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='vehicle')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='vehicle', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='vehicle'):
          if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
              already_processed.add('xsi:type')
              outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
              outfile.write(' xsi:type="%s"' % self.extensiontype_)
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='vehicle', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.wheelcount is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%swheelcount>%s</%swheelcount>%s' % (namespace_, self.gds_format_integer(self.wheelcount, input_name='wheelcount'), namespace_, eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          value = find_attr_value_('xsi:type', node)
          if value is not None and 'xsi:type' not in already_processed:
              already_processed.add('xsi:type')
              self.extensiontype_ = value
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'wheelcount':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              ival_ = self.gds_validate_integer(ival_, node, 'wheelcount')
              self.wheelcount = ival_
  # end class vehicle
  
  
  class automobile(vehicle):
      member_data_items_ = [
          MemberSpec_('drivername', 'xs:string', 0),
      ]
      subclass = None
      superclass = vehicle
      def __init__(self, wheelcount=None, drivername=None):
          self.original_tagname_ = None
          super(automobile, self).__init__(wheelcount, )
          self.drivername = drivername
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, automobile)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if automobile.subclass:
              return automobile.subclass(*args_, **kwargs_)
          else:
              return automobile(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_drivername(self): return self.drivername
      def set_drivername(self, drivername): self.drivername = drivername
      def hasContent_(self):
          if (
              self.drivername is not None or
              super(automobile, self).hasContent_()
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='automobile', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='automobile')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='automobile', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='automobile'):
          super(automobile, self).exportAttributes(outfile, level, already_processed, namespace_, name_='automobile')
      def exportChildren(self, outfile, level, namespace_='', name_='automobile', fromsubclass_=False, pretty_print=True):
          super(automobile, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.drivername is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sdrivername>%s</%sdrivername>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.drivername), input_name='drivername')), namespace_, eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          super(automobile, self).buildAttributes(node, attrs, already_processed)
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'drivername':
              drivername_ = child_.text
              drivername_ = self.gds_validate_string(drivername_, node, 'drivername')
              self.drivername = drivername_
          super(automobile, self).buildChildren(child_, node, nodeName_, True)
  # end class automobile
  
  
  class airplane(vehicle):
      member_data_items_ = [
          MemberSpec_('pilotname', 'xs:string', 0),
      ]
      subclass = None
      superclass = vehicle
      def __init__(self, wheelcount=None, pilotname=None):
          self.original_tagname_ = None
          super(airplane, self).__init__(wheelcount, )
          self.pilotname = pilotname
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, airplane)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if airplane.subclass:
              return airplane.subclass(*args_, **kwargs_)
          else:
              return airplane(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_pilotname(self): return self.pilotname
      def set_pilotname(self, pilotname): self.pilotname = pilotname
      def hasContent_(self):
          if (
              self.pilotname is not None or
              super(airplane, self).hasContent_()
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='airplane', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='airplane')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='airplane', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='airplane'):
          super(airplane, self).exportAttributes(outfile, level, already_processed, namespace_, name_='airplane')
      def exportChildren(self, outfile, level, namespace_='', name_='airplane', fromsubclass_=False, pretty_print=True):
          super(airplane, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.pilotname is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%spilotname>%s</%spilotname>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.pilotname), input_name='pilotname')), namespace_, eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          super(airplane, self).buildAttributes(node, attrs, already_processed)
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'pilotname':
              pilotname_ = child_.text
              pilotname_ = self.gds_validate_string(pilotname_, node, 'pilotname')
              self.pilotname = pilotname_
          super(airplane, self).buildChildren(child_, node, nodeName_, True)
  # end class airplane
  
  
  class programmer(person):
      """A programmer type of person. Programmers are very special but also a
      little shy."""
      member_data_items_ = [
          MemberSpec_('language', 'xs:string', 0),
          MemberSpec_('area', 'xs:string', 0),
          MemberSpec_('attrposint', 'xs:positiveInteger', 0),
          MemberSpec_('attrnonposint', 'xs:nonPositiveInteger', 0),
          MemberSpec_('attrnegint', 'xs:negativeInteger', 0),
          MemberSpec_('attrnonnegint', 'xs:nonNegativeInteger', 0),
          MemberSpec_('email', 'xs:string', 0),
          MemberSpec_('elposint', 'xs:positiveInteger', 0),
          MemberSpec_('elnonposint', 'xs:nonPositiveInteger', 0),
          MemberSpec_('elnegint', 'xs:negativeInteger', 0),
          MemberSpec_('elnonnegint', 'xs:nonNegativeInteger', 0),
          MemberSpec_('eldate', 'xs:date', 0),
          MemberSpec_('eltoken', 'xs:token', 0),
          MemberSpec_('elshort', 'xs:short', 0),
          MemberSpec_('ellong', 'xs:long', 0),
          MemberSpec_('elparam', 'param', 0),
          MemberSpec_('elarraytypes', ['ArrayTypes', 'xs:NMTOKEN'], 0),
      ]
      subclass = None
      superclass = person
      def __init__(self, value=None, id=None, ratio=None, fruit=None, vegetable=None, name=None, interest=None, category=None, agent=None, promoter=None, description=None, language=None, area=None, attrposint=None, attrnonposint=None, attrnegint=None, attrnonnegint=None, email=None, elposint=None, elnonposint=None, elnegint=None, elnonnegint=None, eldate=None, eltoken=None, elshort=None, ellong=None, elparam=None, elarraytypes=None, extensiontype_=None):
          self.original_tagname_ = None
          super(programmer, self).__init__(value, id, ratio, fruit, vegetable, name, interest, category, agent, promoter, description, extensiontype_, )
          self.language = _cast(None, language)
          self.area = _cast(None, area)
          self.attrposint = _cast(int, attrposint)
          self.attrnonposint = _cast(int, attrnonposint)
          self.attrnegint = _cast(int, attrnegint)
          self.attrnonnegint = _cast(int, attrnonnegint)
          self.email = email
          self.elposint = elposint
          self.elnonposint = elnonposint
          self.elnegint = elnegint
          self.elnonnegint = elnonnegint
          if isinstance(eldate, BaseStrType_):
              initvalue_ = datetime_.datetime.strptime(eldate, '%Y-%m-%d').date()
          else:
              initvalue_ = eldate
          self.eldate = initvalue_
          self.eltoken = eltoken
          self.elshort = elshort
          self.ellong = ellong
          self.elparam = elparam
          self.elarraytypes = elarraytypes
          self.validate_ArrayTypes(self.elarraytypes)
          self.extensiontype_ = extensiontype_
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, programmer)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if programmer.subclass:
              return programmer.subclass(*args_, **kwargs_)
          else:
              return programmer(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_email(self): return self.email
      def set_email(self, email): self.email = email
      def get_elposint(self): return self.elposint
      def set_elposint(self, elposint): self.elposint = elposint
      def get_elnonposint(self): return self.elnonposint
      def set_elnonposint(self, elnonposint): self.elnonposint = elnonposint
      def get_elnegint(self): return self.elnegint
      def set_elnegint(self, elnegint): self.elnegint = elnegint
      def get_elnonnegint(self): return self.elnonnegint
      def set_elnonnegint(self, elnonnegint): self.elnonnegint = elnonnegint
      def get_eldate(self): return self.eldate
      def set_eldate(self, eldate): self.eldate = eldate
      def get_eltoken(self): return self.eltoken
      def set_eltoken(self, eltoken): self.eltoken = eltoken
      def get_elshort(self): return self.elshort
      def set_elshort(self, elshort): self.elshort = elshort
      def get_ellong(self): return self.ellong
      def set_ellong(self, ellong): self.ellong = ellong
      def get_elparam(self): return self.elparam
      def set_elparam(self, elparam): self.elparam = elparam
      def get_elarraytypes(self): return self.elarraytypes
      def set_elarraytypes(self, elarraytypes): self.elarraytypes = elarraytypes
      def get_language(self): return self.language
      def set_language(self, language): self.language = language
      def get_area(self): return self.area
      def set_area(self, area): self.area = area
      def get_attrposint(self): return self.attrposint
      def set_attrposint(self, attrposint): self.attrposint = attrposint
      def get_attrnonposint(self): return self.attrnonposint
      def set_attrnonposint(self, attrnonposint): self.attrnonposint = attrnonposint
      def get_attrnegint(self): return self.attrnegint
      def set_attrnegint(self, attrnegint): self.attrnegint = attrnegint
      def get_attrnonnegint(self): return self.attrnonnegint
      def set_attrnonnegint(self, attrnonnegint): self.attrnonnegint = attrnonnegint
      def get_extensiontype_(self): return self.extensiontype_
      def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
      def validate_ArrayTypes(self, value):
          # Validate type ArrayTypes, a restriction on xs:NMTOKEN.
          if value is not None and Validate_simpletypes_:
              value = str(value)
              enumerations = ['float', 'int', 'Name', 'token']
              enumeration_respectee = False
              for enum in enumerations:
                  if value == enum:
                      enumeration_respectee = True
                      break
              if not enumeration_respectee:
                  warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on ArrayTypes' % {"value" : value.encode("utf-8")} )
      def hasContent_(self):
          if (
              self.email is not None or
              self.elposint is not None or
              self.elnonposint is not None or
              self.elnegint is not None or
              self.elnonnegint is not None or
              self.eldate is not None or
              self.eltoken is not None or
              self.elshort is not None or
              self.ellong is not None or
              self.elparam is not None or
              self.elarraytypes is not None or
              super(programmer, self).hasContent_()
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='programmer', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='programmer')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='programmer', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='programmer'):
          super(programmer, self).exportAttributes(outfile, level, already_processed, namespace_, name_='programmer')
          if self.language is not None and 'language' not in already_processed:
              already_processed.add('language')
              outfile.write(' language=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.language), input_name='language')), ))
          if self.area is not None and 'area' not in already_processed:
              already_processed.add('area')
              outfile.write(' area=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.area), input_name='area')), ))
          if self.attrposint is not None and 'attrposint' not in already_processed:
              already_processed.add('attrposint')
              outfile.write(' attrposint="%s"' % self.gds_format_integer(self.attrposint, input_name='attrposint'))
          if self.attrnonposint is not None and 'attrnonposint' not in already_processed:
              already_processed.add('attrnonposint')
              outfile.write(' attrnonposint="%s"' % self.gds_format_integer(self.attrnonposint, input_name='attrnonposint'))
          if self.attrnegint is not None and 'attrnegint' not in already_processed:
              already_processed.add('attrnegint')
              outfile.write(' attrnegint="%s"' % self.gds_format_integer(self.attrnegint, input_name='attrnegint'))
          if self.attrnonnegint is not None and 'attrnonnegint' not in already_processed:
              already_processed.add('attrnonnegint')
              outfile.write(' attrnonnegint="%s"' % self.gds_format_integer(self.attrnonnegint, input_name='attrnonnegint'))
          if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
              already_processed.add('xsi:type')
              outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
              outfile.write(' xsi:type="%s"' % self.extensiontype_)
      def exportChildren(self, outfile, level, namespace_='', name_='programmer', fromsubclass_=False, pretty_print=True):
          super(programmer, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.email is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%semail>%s</%semail>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.email), input_name='email')), namespace_, eol_))
          if self.elposint is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%selposint>%s</%selposint>%s' % (namespace_, self.gds_format_integer(self.elposint, input_name='elposint'), namespace_, eol_))
          if self.elnonposint is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%selnonposint>%s</%selnonposint>%s' % (namespace_, self.gds_format_integer(self.elnonposint, input_name='elnonposint'), namespace_, eol_))
          if self.elnegint is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%selnegint>%s</%selnegint>%s' % (namespace_, self.gds_format_integer(self.elnegint, input_name='elnegint'), namespace_, eol_))
          if self.elnonnegint is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%selnonnegint>%s</%selnonnegint>%s' % (namespace_, self.gds_format_integer(self.elnonnegint, input_name='elnonnegint'), namespace_, eol_))
          if self.eldate is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%seldate>%s</%seldate>%s' % (namespace_, self.gds_format_date(self.eldate, input_name='eldate'), namespace_, eol_))
          if self.eltoken is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%seltoken>%s</%seltoken>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.eltoken), input_name='eltoken')), namespace_, eol_))
          if self.elshort is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%selshort>%s</%selshort>%s' % (namespace_, self.gds_format_integer(self.elshort, input_name='elshort'), namespace_, eol_))
          if self.ellong is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sellong>%s</%sellong>%s' % (namespace_, self.gds_format_integer(self.ellong, input_name='ellong'), namespace_, eol_))
          if self.elparam is not None:
              self.elparam.export(outfile, level, namespace_, name_='elparam', pretty_print=pretty_print)
          if self.elarraytypes is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%selarraytypes>%s</%selarraytypes>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.elarraytypes), input_name='elarraytypes')), namespace_, eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          value = find_attr_value_('language', node)
          if value is not None and 'language' not in already_processed:
              already_processed.add('language')
              self.language = value
          value = find_attr_value_('area', node)
          if value is not None and 'area' not in already_processed:
              already_processed.add('area')
              self.area = value
          value = find_attr_value_('attrposint', node)
          if value is not None and 'attrposint' not in already_processed:
              already_processed.add('attrposint')
              try:
                  self.attrposint = int(value)
              except ValueError as exp:
                  raise_parse_error(node, 'Bad integer attribute: %s' % exp)
              if self.attrposint <= 0:
                  raise_parse_error(node, 'Invalid PositiveInteger')
          value = find_attr_value_('attrnonposint', node)
          if value is not None and 'attrnonposint' not in already_processed:
              already_processed.add('attrnonposint')
              try:
                  self.attrnonposint = int(value)
              except ValueError as exp:
                  raise_parse_error(node, 'Bad integer attribute: %s' % exp)
              if self.attrnonposint > 0:
                  raise_parse_error(node, 'Invalid NonPositiveInteger')
          value = find_attr_value_('attrnegint', node)
          if value is not None and 'attrnegint' not in already_processed:
              already_processed.add('attrnegint')
              try:
                  self.attrnegint = int(value)
              except ValueError as exp:
                  raise_parse_error(node, 'Bad integer attribute: %s' % exp)
              if self.attrnegint >= 0:
                  raise_parse_error(node, 'Invalid NegativeInteger')
          value = find_attr_value_('attrnonnegint', node)
          if value is not None and 'attrnonnegint' not in already_processed:
              already_processed.add('attrnonnegint')
              try:
                  self.attrnonnegint = int(value)
              except ValueError as exp:
                  raise_parse_error(node, 'Bad integer attribute: %s' % exp)
              if self.attrnonnegint < 0:
                  raise_parse_error(node, 'Invalid NonNegativeInteger')
          value = find_attr_value_('xsi:type', node)
          if value is not None and 'xsi:type' not in already_processed:
              already_processed.add('xsi:type')
              self.extensiontype_ = value
          super(programmer, self).buildAttributes(node, attrs, already_processed)
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'email':
              email_ = child_.text
              email_ = self.gds_validate_string(email_, node, 'email')
              self.email = email_
          elif nodeName_ == 'elposint':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              if ival_ <= 0:
                  raise_parse_error(child_, 'requires positiveInteger')
              ival_ = self.gds_validate_integer(ival_, node, 'elposint')
              self.elposint = ival_
          elif nodeName_ == 'elnonposint':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              if ival_ > 0:
                  raise_parse_error(child_, 'requires nonPositiveInteger')
              ival_ = self.gds_validate_integer(ival_, node, 'elnonposint')
              self.elnonposint = ival_
          elif nodeName_ == 'elnegint':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              if ival_ >= 0:
                  raise_parse_error(child_, 'requires negativeInteger')
              ival_ = self.gds_validate_integer(ival_, node, 'elnegint')
              self.elnegint = ival_
          elif nodeName_ == 'elnonnegint':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              if ival_ < 0:
                  raise_parse_error(child_, 'requires nonNegativeInteger')
              ival_ = self.gds_validate_integer(ival_, node, 'elnonnegint')
              self.elnonnegint = ival_
          elif nodeName_ == 'eldate':
              sval_ = child_.text
              dval_ = self.gds_parse_date(sval_)
              self.eldate = dval_
          elif nodeName_ == 'eltoken':
              eltoken_ = child_.text
              if eltoken_:
                  eltoken_ = re_.sub(String_cleanup_pat_, " ", eltoken_).strip()
              else:
                  eltoken_ = ""
              eltoken_ = self.gds_validate_string(eltoken_, node, 'eltoken')
              self.eltoken = eltoken_
          elif nodeName_ == 'elshort':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              ival_ = self.gds_validate_integer(ival_, node, 'elshort')
              self.elshort = ival_
          elif nodeName_ == 'ellong':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              ival_ = self.gds_validate_integer(ival_, node, 'ellong')
              self.ellong = ival_
          elif nodeName_ == 'elparam':
              obj_ = param.factory()
              obj_.build(child_)
              self.elparam = obj_
              obj_.original_tagname_ = 'elparam'
          elif nodeName_ == 'elarraytypes':
              elarraytypes_ = child_.text
              elarraytypes_ = self.gds_validate_string(elarraytypes_, node, 'elarraytypes')
              self.elarraytypes = elarraytypes_
              # validate type ArrayTypes
              self.validate_ArrayTypes(self.elarraytypes)
          super(programmer, self).buildChildren(child_, node, nodeName_, True)
  # end class programmer
  
  
  class client_handlerType(GeneratedsSuper):
      member_data_items_ = [
          MemberSpec_('fullname', 'xs:string', 0),
          MemberSpec_('refid', 'xs:integer', 0),
      ]
      subclass = None
      superclass = None
      def __init__(self, fullname=None, refid=None):
          self.original_tagname_ = None
          self.fullname = fullname
          self.refid = refid
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, client_handlerType)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if client_handlerType.subclass:
              return client_handlerType.subclass(*args_, **kwargs_)
          else:
              return client_handlerType(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_fullname(self): return self.fullname
      def set_fullname(self, fullname): self.fullname = fullname
      def get_refid(self): return self.refid
      def set_refid(self, refid): self.refid = refid
      def hasContent_(self):
          if (
              self.fullname is not None or
              self.refid is not None
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='client-handlerType', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='client-handlerType')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='client-handlerType', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='client-handlerType'):
          pass
      def exportChildren(self, outfile, level, namespace_='', name_='client-handlerType', fromsubclass_=False, pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.fullname is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sfullname>%s</%sfullname>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.fullname), input_name='fullname')), namespace_, eol_))
          if self.refid is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%srefid>%s</%srefid>%s' % (namespace_, self.gds_format_integer(self.refid, input_name='refid'), namespace_, eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          pass
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'fullname':
              fullname_ = child_.text
              fullname_ = self.gds_validate_string(fullname_, node, 'fullname')
              self.fullname = fullname_
          elif nodeName_ == 'refid':
              sval_ = child_.text
              try:
                  ival_ = int(sval_)
              except (TypeError, ValueError) as exp:
                  raise_parse_error(child_, 'requires integer: %s' % exp)
              ival_ = self.gds_validate_integer(ival_, node, 'refid')
              self.refid = ival_
  # end class client_handlerType
  
  
  class java_programmer(programmer):
      """A Java programmer type of person. Programmers are very special and
      Java programmers are nice also, but not as especially wonderful
      as Python programmers, of course."""
      member_data_items_ = [
          MemberSpec_('nick-name', 'xs:string', 0),
          MemberSpec_('status', 'xs:string', 0),
          MemberSpec_('favorite_editor', 'xs:string', 0),
      ]
      subclass = None
      superclass = programmer
      def __init__(self, value=None, id=None, ratio=None, fruit=None, vegetable=None, name=None, interest=None, category=None, agent=None, promoter=None, description=None, language=None, area=None, attrposint=None, attrnonposint=None, attrnegint=None, attrnonnegint=None, email=None, elposint=None, elnonposint=None, elnegint=None, elnonnegint=None, eldate=None, eltoken=None, elshort=None, ellong=None, elparam=None, elarraytypes=None, nick_name=None, status=None, favorite_editor=None):
          self.original_tagname_ = None
          super(java_programmer, self).__init__(value, id, ratio, fruit, vegetable, name, interest, category, agent, promoter, description, language, area, attrposint, attrnonposint, attrnegint, attrnonnegint, email, elposint, elnonposint, elnegint, elnonnegint, eldate, eltoken, elshort, ellong, elparam, elarraytypes, )
          self.nick_name = _cast(None, nick_name)
          self.status = _cast(None, status)
          self.favorite_editor = favorite_editor
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, java_programmer)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if java_programmer.subclass:
              return java_programmer.subclass(*args_, **kwargs_)
          else:
              return java_programmer(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_favorite_editor(self): return self.favorite_editor
      def set_favorite_editor(self, favorite_editor): self.favorite_editor = favorite_editor
      def get_nick_name(self): return self.nick_name
      def set_nick_name(self, nick_name): self.nick_name = nick_name
      def get_status(self): return self.status
      def set_status(self, status): self.status = status
      def hasContent_(self):
          if (
              self.favorite_editor is not None or
              super(java_programmer, self).hasContent_()
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='java-programmer', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='java-programmer')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='java-programmer', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='java-programmer'):
          super(java_programmer, self).exportAttributes(outfile, level, already_processed, namespace_, name_='java-programmer')
          if self.nick_name is not None and 'nick_name' not in already_processed:
              already_processed.add('nick_name')
              outfile.write(' nick-name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.nick_name), input_name='nick-name')), ))
          if self.status is not None and 'status' not in already_processed:
              already_processed.add('status')
              outfile.write(' status=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.status), input_name='status')), ))
      def exportChildren(self, outfile, level, namespace_='', name_='java-programmer', fromsubclass_=False, pretty_print=True):
          super(java_programmer, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.favorite_editor is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sfavorite-editor>%s</%sfavorite-editor>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.favorite_editor), input_name='favorite-editor')), namespace_, eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          value = find_attr_value_('nick-name', node)
          if value is not None and 'nick-name' not in already_processed:
              already_processed.add('nick-name')
              self.nick_name = value
          value = find_attr_value_('status', node)
          if value is not None and 'status' not in already_processed:
              already_processed.add('status')
              self.status = value
          super(java_programmer, self).buildAttributes(node, attrs, already_processed)
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'favorite-editor':
              favorite_editor_ = child_.text
              favorite_editor_ = self.gds_validate_string(favorite_editor_, node, 'favorite_editor')
              self.favorite_editor = favorite_editor_
          super(java_programmer, self).buildChildren(child_, node, nodeName_, True)
  # end class java_programmer
  
  
  class python_programmer(programmer):
      """A Python programmer type of person. Programmers are very special and
      Python programmers are especially wonderful kinds of people."""
      member_data_items_ = [
          MemberSpec_('nick-name', 'xs:string', 0),
          MemberSpec_('favorite_editor', 'xs:string', 0),
      ]
      subclass = None
      superclass = programmer
      def __init__(self, value=None, id=None, ratio=None, fruit=None, vegetable=None, name=None, interest=None, category=None, agent=None, promoter=None, description=None, language=None, area=None, attrposint=None, attrnonposint=None, attrnegint=None, attrnonnegint=None, email=None, elposint=None, elnonposint=None, elnegint=None, elnonnegint=None, eldate=None, eltoken=None, elshort=None, ellong=None, elparam=None, elarraytypes=None, nick_name=None, favorite_editor=None):
          self.original_tagname_ = None
          super(python_programmer, self).__init__(value, id, ratio, fruit, vegetable, name, interest, category, agent, promoter, description, language, area, attrposint, attrnonposint, attrnegint, attrnonnegint, email, elposint, elnonposint, elnegint, elnonnegint, eldate, eltoken, elshort, ellong, elparam, elarraytypes, )
          self.nick_name = _cast(None, nick_name)
          self.favorite_editor = favorite_editor
      def factory(*args_, **kwargs_):
          if CurrentSubclassModule_ is not None:
              subclass = getSubclassFromModule_(
                  CurrentSubclassModule_, python_programmer)
              if subclass is not None:
                  return subclass(*args_, **kwargs_)
          if python_programmer.subclass:
              return python_programmer.subclass(*args_, **kwargs_)
          else:
              return python_programmer(*args_, **kwargs_)
      factory = staticmethod(factory)
      def get_favorite_editor(self): return self.favorite_editor
      def set_favorite_editor(self, favorite_editor): self.favorite_editor = favorite_editor
      def get_nick_name(self): return self.nick_name
      def set_nick_name(self, nick_name): self.nick_name = nick_name
      def hasContent_(self):
          if (
              self.favorite_editor is not None or
              super(python_programmer, self).hasContent_()
          ):
              return True
          else:
              return False
      def export(self, outfile, level, namespace_='', name_='python-programmer', namespacedef_='', pretty_print=True):
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.original_tagname_ is not None:
              name_ = self.original_tagname_
          showIndent(outfile, level, pretty_print)
          outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
          already_processed = set()
          self.exportAttributes(outfile, level, already_processed, namespace_, name_='python-programmer')
          if self.hasContent_():
              outfile.write('>%s' % (eol_, ))
              self.exportChildren(outfile, level + 1, namespace_='', name_='python-programmer', pretty_print=pretty_print)
              showIndent(outfile, level, pretty_print)
              outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
          else:
              outfile.write('/>%s' % (eol_, ))
      def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='python-programmer'):
          super(python_programmer, self).exportAttributes(outfile, level, already_processed, namespace_, name_='python-programmer')
          if self.nick_name is not None and 'nick_name' not in already_processed:
              already_processed.add('nick_name')
              outfile.write(' nick-name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.nick_name), input_name='nick-name')), ))
      def exportChildren(self, outfile, level, namespace_='', name_='python-programmer', fromsubclass_=False, pretty_print=True):
          super(python_programmer, self).exportChildren(outfile, level, namespace_, name_, True, pretty_print=pretty_print)
          if pretty_print:
              eol_ = '\n'
          else:
              eol_ = ''
          if self.favorite_editor is not None:
              showIndent(outfile, level, pretty_print)
              outfile.write('<%sfavorite-editor>%s</%sfavorite-editor>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.favorite_editor), input_name='favorite-editor')), namespace_, eol_))
      def build(self, node):
          already_processed = set()
          self.buildAttributes(node, node.attrib, already_processed)
          for child in node:
              nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
              self.buildChildren(child, node, nodeName_)
          return self
      def buildAttributes(self, node, attrs, already_processed):
          value = find_attr_value_('nick-name', node)
          if value is not None and 'nick-name' not in already_processed:
              already_processed.add('nick-name')
              self.nick_name = value
          super(python_programmer, self).buildAttributes(node, attrs, already_processed)
      def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
          if nodeName_ == 'favorite-editor':
              favorite_editor_ = child_.text
              favorite_editor_ = self.gds_validate_string(favorite_editor_, node, 'favorite_editor')
              self.favorite_editor = favorite_editor_
          super(python_programmer, self).buildChildren(child_, node, nodeName_, True)
  # end class python_programmer
  
  
  GDSClassesMapping = {
      'client-handler': client_handlerType,
      'elparam': param,
      'promoter': booster,
  }
  
  
  USAGE_TEXT = """
  Usage: python <Parser>.py [ -s ] <in_xml_file>
  """
  
  
  def usage():
      print(USAGE_TEXT)
      sys.exit(1)
  
  
  def get_root_tag(node):
      tag = Tag_pattern_.match(node.tag).groups()[-1]
      rootClass = GDSClassesMapping.get(tag)
      if rootClass is None:
          rootClass = globals().get(tag)
      return tag, rootClass
  
  
  def parse(inFileName, silence=False):
      parser = None
      doc = parsexml_(inFileName, parser)
      rootNode = doc.getroot()
      rootTag, rootClass = get_root_tag(rootNode)
      if rootClass is None:
          rootTag = 'people'
          rootClass = people
      rootObj = rootClass.factory()
      rootObj.build(rootNode)
      # Enable Python to collect the space used by the DOM.
      doc = None
  ##     if not silence:
  ##         sys.stdout.write('<?xml version="1.0" ?>\n')
  ##         rootObj.export(
  ##             sys.stdout, 0, name_=rootTag,
  ##             namespacedef_='',
  ##             pretty_print=True)
      return rootObj
  
  
  def parseEtree(inFileName, silence=False):
      parser = None
      doc = parsexml_(inFileName, parser)
      rootNode = doc.getroot()
      rootTag, rootClass = get_root_tag(rootNode)
      if rootClass is None:
          rootTag = 'people'
          rootClass = people
      rootObj = rootClass.factory()
      rootObj.build(rootNode)
      # Enable Python to collect the space used by the DOM.
      doc = None
      mapping = {}
      rootElement = rootObj.to_etree(None, name_=rootTag, mapping_=mapping)
      reverse_mapping = rootObj.gds_reverse_node_mapping(mapping)
  ##     if not silence:
  ##         content = etree_.tostring(
  ##             rootElement, pretty_print=True,
  ##             xml_declaration=True, encoding="utf-8")
  ##         sys.stdout.write(content)
  ##         sys.stdout.write('\n')
      return rootObj, rootElement, mapping, reverse_mapping
  
  
  def parseString(inString, silence=False):
      from StringIO import StringIO
      parser = None
      doc = parsexml_(StringIO(inString), parser)
      rootNode = doc.getroot()
      rootTag, rootClass = get_root_tag(rootNode)
      if rootClass is None:
          rootTag = 'people'
          rootClass = people
      rootObj = rootClass.factory()
      rootObj.build(rootNode)
      # Enable Python to collect the space used by the DOM.
      doc = None
  ##     if not silence:
  ##         sys.stdout.write('<?xml version="1.0" ?>\n')
  ##         rootObj.export(
  ##             sys.stdout, 0, name_=rootTag,
  ##             namespacedef_='')
      return rootObj
  
  
  def parseLiteral(inFileName, silence=False):
      parser = None
      doc = parsexml_(inFileName, parser)
      rootNode = doc.getroot()
      rootTag, rootClass = get_root_tag(rootNode)
      if rootClass is None:
          rootTag = 'people'
          rootClass = people
      rootObj = rootClass.factory()
      rootObj.build(rootNode)
      # Enable Python to collect the space used by the DOM.
      doc = None
  ##     if not silence:
  ##         sys.stdout.write('#from people_procincl2_sup import *\n\n')
  ##         sys.stdout.write('import people_procincl2_sup as model_\n\n')
  ##         sys.stdout.write('rootObj = model_.rootClass(\n')
  ##         rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)
  ##         sys.stdout.write(')\n')
      return rootObj
  
  
  def main():
      args = sys.argv[1:]
      if len(args) == 1:
          parse(args[0])
      else:
          usage()
  
  
  if __name__ == '__main__':
      #import pdb; pdb.set_trace()
      main()
  
  
  __all__ = [
      "agent",
      "airplane",
      "automobile",
      "booster",
      "client_handlerType",
      "comments",
      "info",
      "java_programmer",
      "param",
      "people",
      "person",
      "programmer",
      "python_programmer",
      "special_agent",
      "specialperson",
      "vehicle"
  ]
  