let map_xsdtype_to_ocaml xsdtype nillable min_occurs max_occurs =
  (* How are we going to map this to an OCaml type?  Decide if it is
   * plain t, or t option, or t list.
   *)

  let is_option = ref false in
  let is_list = ref false in
  if max_occurs = -1 || max_occurs > 1 then is_list := true;
  if not !is_list then
    if nillable || min_occurs = 0 then is_option := true;
  let octype = convert_type xsdtype in
  octype, !is_option, !is_list