code: func typeToString(typ reflect.Type) string {
  	switch typ.Kind() {
  	case reflect.Bool:
  		return "xsd:boolean"
  	case reflect.Int8:
  		return "xsd:byte"
  	case reflect.Int16:
  		return "xsd:short"
  	case reflect.Int32:
  		return "xsd:int"
  	case reflect.Int, reflect.Int64:
  		return "xsd:long"
  	case reflect.Uint8:
  		return "xsd:unsignedByte"
  	case reflect.Uint16:
  		return "xsd:unsignedShort"
  	case reflect.Uint32:
  		return "xsd:unsignedInt"
  	case reflect.Uint, reflect.Uint64:
  		return "xsd:unsignedLong"
  	case reflect.Float32:
  		return "xsd:float"
  	case reflect.Float64:
  		return "xsd:double"
  	case reflect.String:
  		name := typ.Name()
  		if name == "string" {
  			return "xsd:string"
  		}
  		return name
  	case reflect.Struct:
  		if typ == stringToTypeMap["xsd:dateTime"] {
  			return "xsd:dateTime"
  		}
  
  		// Expect any other struct to be handled...
  		return typ.Name()
  	case reflect.Slice:
  		if typ.Elem().Kind() == reflect.Uint8 {
  			return "xsd:base64Binary"
  		}
  	case reflect.Array:
  		if typ.Elem().Kind() == reflect.Uint8 {
  			return "xsd:base64Binary"
  		}
  	}
  
  	panic("don't know what to do for type: " + typ.String())
  }
docs: // Return a string for the specified reflect.Type. Panic if unknown.