[Psi-devel] Namespace declaration, that is not required

Justin Karneges justin-psi2 at affinix.com
Sun Mar 18 15:32:13 PDT 2007


On Sunday 18 March 2007 2:09 pm, Matthias Wimmer wrote:
> Remko Tronçon schrieb:
> >> I just noticed, that Psi sends an declaration for the xml namespace
> >> prefix in the stream root.
> >
> > I don't know the reason, but i don't see why we should remove it
> > either (it's not as if anything could break, on the contrary). Unless
> > someone says otherwise?
>
> I don't see a reason why it must be removed either ... I just want to
> notice this as it generates unnecessary (but not much) traffic and as it
> is uncommon to declare this namespace. (E.g. the xml:lang attribute is
> used on many (X)HTML documents as well, but I've never seen that the
> namespace prefix was defined on such a document.)
>
> Sure it makes no big difference either way ... so there is no big
> argument for changing it. But there is also no big argument to keep it
> that way, no?

The internal Iris function, stripExtraNS() in xmlprotocol.cpp, strips away 
redundant namespace declarations, including this one.  It is already applied 
to stanzas (otherwise, for example, we end up with "jabber:client" on 
everything).  I guess it isn't being applied to the <stream> element, but we 
should probably do it.

-Justin


More information about the psi-devel mailing list