On 2/28/08, Tomasz Sterna <[EMAIL PROTECTED]> wrote:
>
> Implementing a correct XML parser is very tedious and error prone job.
>  It's always better to use one of the publicly available and well
>  established parsers.
>  Other way you'll end up redoing the hard work the implementers of these
>  parsers did already. ;-)

It could be true if XMPP were defined as a XML subset in a consistent
way (currently, XMPP doesn't require stream to be
namesapce-well-formed, but allows to use XMLNS namespaces). But for
now we got two famous examples:

1) Gajim uses XMLNS prefixes and expects them to be defined. So, it
disconnects on receiving <message><gajim:die/></message>.

2) Ejabberd doesn't respect XMLNS prefixes, so it doesn't understand
query like the following: <iq
xmlns:v='jabber:iq:version'><v:query></iq> (but routes them happily).

And the interesting problem is that generic XML parsers (expat for
example) implement either namespace-well-formed document (with bound
XMLNS prefixes, Gajim case) parsers or simpy ignore namespace prefixes
(ejabberd case).

This means that impementing XMPP software one have to either implement
an XML parser or end up with either sometimes dying or somewhat
incompatible software.

It would be much better and easier to work with, if XMPP required XML
streams to be namespace-well-formed.

-- 
Sergei Golovan

Reply via email to