parameters: (self)
return_statement: return rest_dict
docstring: Converts object to a dictionary, adding required attributes.
  
          :return: Xmlschema compliant dictionary.
          :rtype: dict
docstring_summary: Converts object to a dictionary, adding required attributes.
docstring_tokens: Converts object to a dictionary adding required attributes .
function: def asdict(self):
          """Converts object to a dictionary, adding required attributes.
  
          :return: Xmlschema compliant dictionary.
          :rtype: dict
          """
          rest_dict = {"@base": "xs:" + self.base}
          if self.type == "enumeration":
              for option in self.options:
                  if "xs:enumeration" not in rest_dict:
                      rest_dict["xs:enumeration"] = [{"@value": option}]
                  else:
                      rest_dict["xs:enumeration"].append({"@value": option})
          elif self.type == "bounds":
              for option in self.options:
                  if "xs:option" not in rest_dict:
                      rest_dict["xs:" + option] = [{"@value": option}]
                  else:
                      rest_dict["xs:" + option].append({"@value": self.options[option], "@fixed": False})
          elif self.type == "pattern":
              if "xs:pattern" not in rest_dict:
                  rest_dict["xs:pattern"] = [{"@value": self.options}]
              else:
                  rest_dict["xs:pattern"].append({"@value": self.options})
          return rest_dict
function_tokens: def asdict ( self ) : rest_dict = { "@base" : "xs:" + self . base } if self . type == "enumeration" : for option in self . options : if "xs:enumeration" not in rest_dict : rest_dict [ "xs:enumeration" ] = [ { "@value" : option } ] else : rest_dict [ "xs:enumeration" ] . append ( { "@value" : option } ) elif self . type == "bounds" : for option in self . options : if "xs:option" not in rest_dict : rest_dict [ "xs:" + option ] = [ { "@value" : option } ] else : rest_dict [ "xs:" + option ] . append ( { "@value" : self . options [ option ] , "@fixed" : False } ) elif self . type == "pattern" : if "xs:pattern" not in rest_dict : rest_dict [ "xs:pattern" ] = [ { "@value" : self . options } ] else : rest_dict [ "xs:pattern" ] . append ( { "@value" : self . options } ) return rest_dict