anchor.diff:    {Name, NextLevelEnclosingNs} = avro:split_type_name(T, Namespace),
     SchemaObjectFields =
       [ optional_field(namespace, ns(Namespace, EnclosingNamespace),
  -                     ?NS_GLOBAL, fun encode_string/1, Opt)
  +                     ?NS_GLOBAL, fun encode_string/1)
       , {name, encode_string(Name)}
       , {type, encode_string(?AVRO_RECORD)}
  -    , optional_field(doc,       Doc,  ?NO_DOC, fun encode_string/1, Opt)
  -    , optional_field(aliases,   Aliases,   [], fun encode_aliases/1, Opt)
  +    , optional_field(doc,       Doc,  ?NO_DOC, fun encode_string/1)
  +    , optional_field(aliases,   Aliases,   [], fun encode_aliases/1)
       , {fields, lists:map(fun(F) ->
                                encode_field(F, NextLevelEnclosingNs, Opt)
                            end, Fields)}
  
positive.code:   [ {name, encode_string(Name)}
    , {type, do_encode_type(Type, EnclosingNamespace, Opt)}
    ]
    ++ optional_field(default, Default, ?NO_VALUE, fun(X) -> ?INLINE(X) end, Opt)
    ++ optional_field(doc,     Doc,     ?NO_DOC,   fun encode_string/1, Opt)
    ++ optional_field(order,   Order,   ascending, fun encode_order/1, Opt)
    ++ optional_field(aliases, Aliases, [],        fun encode_aliases/1, Opt).
  
  %% @private Get namespace to encode.
  %% Ignore namespace to encode if it is the same as enclosing namesapce
  
negative.code:     , {symbols, lists:map(fun encode_string/1, Symbols)}
      ],
    lists:flatten(SchemaObjectFields);
  do_encode_type(#avro_enum_type{} = T, EnclosingNamespace, _Opt) ->
    #avro_enum_type{ name      = Name
                   , namespace = Namespace
                   , aliases   = Aliases
  