[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmpp] Fwd: Use of namespace in RFC 3920



On Thu Sep 24 09:38:25 2009, Remko Tronçon wrote:
> That's indeed what I am doing. Right now XMPP is not really following
> XML rules. It made new ones, and make it more difficult.

As far as i remember, XMPP is following XML rules, but only made them stricter, such that the parsers were simpler (i.e. didn't have to deal with full XML spec). This implies that the serializers have to play by some rules (which isn't so bad, since serializing doesn't necessarily
need an XML library).

I don't really see why you would need to modify your XML parser to
handle XMPP if it can handle XML, but maybe I'm missing something.

You need to find out what the default namespace is bound to.

You can do this by concatenating a dummy element early on, if needs be - so you insert a "<tracer/>", then look to see what namespace it ended up with.

The serializer need to be able to explicitly set the default namespace, instead of shoving everything under ugly machine generated namespace prefices.

But this assumes that your XML library doesn't simply allow you to lookup, and set, the default namespace prefix anyway - I can't really believe that this would be unusual, given that it's useful for producing compact serialized output in many cases.

Dave.
--
Dave Cridland - mailto:dave at cridland.net - xmpp:dwd at dave.cridland.net
 - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
 - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

Note Well: Messages sent to this mailing list are the opinions of the senders and do not imply endorsement by the IETF.