While migrating an existing module from 2.x to 3.x, I am getting the following error:
** Reason for termination =
** {function_clause,
[{exmpp_xml,xmlnsattributes_to_xmlattributes2,
[{xmlattr,undefined,<<"var">>,<<"device">>},
[{'http://etherx.jabber.org/streams',"stream"},
{'jabber:server:dialback',"db"}],
[]]},
{exmpp_xml,unresolve_xmlel_nss,3},
{exmpp_xml,node_to_iolist2,4},
{exmpp_xml,element_to_iolist,5},
{exmpp_xml,node_to_iolist2,4},
{exmpp_xml,element_to_iolist,5},
{exmpp_xml,node_to_iolist2,4},
{ejabberd_c2s,send_element,2}]}
Looks like using exmpp_xml:attribute(Name, Value) creates #xmlattr with ns = undefined. Should that not get stripped out by the underlying library or is the expectation that every attribute and element needs to provide the NS?
Never mind. Problem in
Never mind. Problem in another part of code.