Parser borrowing not XML-compliant

Pedro Melo melo at simplicidade.org
Fri Sep 22 17:37:29 UTC 2006


Hi,

On 2006/09/22, at 18:11, Martin Atkins wrote:

> Mika Raento wrote:
>> Hi
>> I've been playing with djabberd as an option for Jaiku  
>> ( www.jaiku.com/
>> ), and it seems nicely modifiable. I however got a problem as soon  
>> as I
>> connected two different clients: we use our own extensions in Jabber,
>> with our own namespace which we declare on the stream element.
>> Now if parsers are borrowed, the parser we get may not have the right
>> namespace.
>
> Yikes. That's terrible.
>
> I guess this never got noticed because most clients tend to use the  
> same prefixes for the same namespaces, and tend to declare most of  
> their namespaces on the individual XMPP "packets" rather than on  
> the entire stream.
>
> Not entirely sure how this can be solved, though. I'm not sure how  
> the parser-sharing works, but I guess what we need to do is track  
> per-connection what namespace each prefix maps to, and then make  
> sure that when a parser is "borrowed" it's using the right set of  
> prefixes. I doubt LibXML would let us screw around with its prefix  
> to namespace mappings, though. *shrug*

Yes it does let us do that with the setNamepace( prexif =>  
namespace_uri ) call

Best regards,
--
Pedro Melo
JID: xmpp:melo at simplicidade.org




More information about the Djabberd mailing list