anchor.diff:          att_dec := AttDec,
           writer := Writer,
           counter := Counter,
  -        nsps := Scp} = State, ElementLocalName) ->
  +        nsps := Scp} = State, ElementName) ->
      NodeId = add_pos(Ps, Pos),
      Uri = ?u2b(UriS),
      Prefix = ?u2b(PrefixS),
      Bin = ?u2b(ValueS),
      AttributeName = ?u2b(AttributeNameS),
      #{Uri := UriId} = Scp,
  -   Type = get_att_type({ElementLocalName, AttributeName}, AttDec),
  +   Type = get_att_type({ElementName, {PrefixS, AttributeNameS}}, AttDec),
      TextRef = get_text_id(DB, Bin),
      {PrefixId, Scp1} = get_name_id(DB, Prefix, Scp),
      {NameId, NameMap1} = get_name_id(DB, AttributeName, NameMap),
  
positive.code:                      paths := Paths1,
                       nsps := Scp1,
                       counter := Counter1}, 
                ElementLocalName);
  att_events([],State,_) ->
     State.
  
  
negative.code:                    AttDec#{Key => ?att_str}
               end,
     State#{att_dec := AttDec1};
  % non-tuple: is string from xmerl before event change to qualified name
  event({attributeDecl, ElementName, AttributeName, Type, Mode, Value}, L, State) ->
     ElementName1 = 
        case string:split(ElementName, ":") of
           [P, L] -> {P, L};
           [L] -> {[], L}
        end,
     AttributeName1 = 
        case string:split(AttributeName, ":") of
           [AP, AL] -> {AP, AL};
           [AL] -> {[], AL}
        end,
     event({attributeDecl, ElementName1, AttributeName1, Type, Mode, Value}, L, State);
  
  % base uri sent from constructors and updates
  event({baseUri, _},_,State) -> State;
  