anchor.diff:  do_encode_type(#avro_union_type{types = Types}, EnclosingNamespace) ->
     F = fun({_Index, Type}) -> do_encode_type(Type, EnclosingNamespace) end,
     lists:map(F, Types);
  -do_encode_type(#avro_fixed_type{} = T, _EnclosingNamespace) ->
  +do_encode_type(#avro_fixed_type{} = T, EnclosingNamespace) ->
     #avro_fixed_type{ name = Name
                     , namespace = Namespace
                     , aliases = Aliases
                     , size = Size} = T,
     SchemaObjectFields =
  -    [ optional_field(namespace, Namespace, "", fun encode_string/1)
  +    [ optional_field(namespace, ns(Namespace, EnclosingNamespace),
  +                     ?NAMESPACE_NONE, fun encode_string/1)
       , {type, encode_string("fixed")}
       , {name, encode_string(Name)}
       , {size, encode_integer(Size)}
  
positive.code:     ++ optional_field(order,   Order,   ascending, fun encode_order/1)
      ++ optional_field(aliases, Aliases, [],        fun encode_aliases/1)
    }.
  
  encode_string(String) ->
    erlang:list_to_binary(String).
  
negative.code:                    , aliases   = Aliases
                     , fields    = Fields
                     } = T,
    {Name, NewEnclosingNamespace} = avro:split_type_name(T, EnclosingNamespace),
    SchemaObjectFields =
      [ optional_field(namespace, ns(Namespace, EnclosingNamespace),
                       ?NAMESPACE_NONE, fun encode_string/1)
      , {type,   encode_string("record")}
      , {name,   encode_string(Name)}
      , optional_field(doc,       Doc,       "", fun encode_string/1)
      , optional_field(aliases,   Aliases,   [], fun encode_aliases/1)
      , {fields, lists:map(fun(F) -> encode_field(F, NewEnclosingNamespace) end,
                           Fields)}
      ],
    {struct, lists:flatten(SchemaObjectFields)};
  do_encode_type(#avro_enum_type{} = T, EnclosingNamespace) ->
    #avro_enum_type{ name      = Name
                   , namespace = Namespace
                   , aliases   = Aliases
                   , doc       = Doc
                   , symbols   = Symbols} = T,
    SchemaObjectFields =
      [ optional_field(namespace, ns(Namespace, EnclosingNamespace),
                       ?NAMESPACE_NONE, fun encode_string/1)
      , {type,    encode_string("enum")}
      , {name,    encode_string(Name)}
      , optional_field(doc,       Doc,       "", fun encode_string/1)
  