[Standards] Privacy lists and the order of items

Waqas Hussain waqas20 at gmail.com
Tue May 12 00:18:25 UTC 2009


On Tue, May 12, 2009 at 4:40 AM, Justin Karneges
<justin-keyword-jabber.093179 at affinix.com> wrote:
> On Monday 11 May 2009 16:28:00 Waqas Hussain wrote:
>> On Mon, May 11, 2009 at 7:10 PM, Peter Saint-Andre <stpeter at stpeter.im>
> wrote:
>> > Can you trust the order of items?
>>
>> Err, explain to me why you wouldn't. Order of nodes (except attributes
>> on an element) is significant in XML.
>
> I've heard that some XMPP codebases out there may (stupidly?) store a stanza's
> element hierarchy in a "hash" tree or other, which may not maintain element
> order.  So the XML is parsed properly, and stanzas are processed in order,
> but elements within a stanza may not be processed in order because the
> ordering is lost during the dom->hash transition.
>
Making life difficult for everyone else because of (stupid?) codebases
which may be out there... Said codebases are not based on any standard
API (DOM, SAX, etc) for one, and wouldn't work correctly for many of
the existing XEPs anyway.

> I want to say at least one such codebase was using Perl, where it's
> commonplace to use these hash trees for everything.  Not that I'm saying it's
> right...
>
So.. since the codebase you are referring to uses hashtables, and
therefore can't handle two children with the same name (or whatever
hash key they are using), XMPP would never allow that to happen?
(Several specs do in fact allow it to happen, some might even require
it.)

And if we are saving codebases, there's XML and UTF-8 and
stringprepping! I'm sure we would save a LOT of codebases out there,
if we dropped the valid XML requirement, etc. Look at HTML 5. They
have added polite handling guidelines for "badly-formed code" to the
specification itself, so we might as well too...

This may appear snarky, but I'm mostly somewhere between bemused and amused.

> -Justin
>

--
Waqas Hussain



More information about the Standards mailing list