-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The recent discussion about namespaced attributes on the [email protected]
list set me to thinking about the separation of routing information and
payload data. Perhaps it makes sense to recommend that routing
information is best included via namespaced attributes of the root
element for the stanza, reserving children of the stanza element for
payloads. This would enable a server to avoid deep packet inspection on
stanzas.

So, for instance, here is a current SHIM example from XEP-0131:

<message from='[email protected]/orchard'
         to='[email protected]/balcony'>
  <body>Neither, fair saint, if either thee dislike.</body>
  <headers xmlns='http://jabber.org/protocol/shim'>
    <header name='In-Reply-To'>[email protected]</header>
    <header name='Keywords'>shakespeare,&lt;xmpp/&gt;</header>
  </headers>
</message>

If we put the headers into the <message/> element with a new namespace,
we might have something like this:

<message xmlns:shim='urn:xmpp:shim:1'
         from='[email protected]/orchard'
         to='[email protected]/balcony'
         shim:In-Reply-To='[email protected]'
         shim:Keywords='shakespeare,&lt;xmpp/&gt;'>
  <body>Neither, fair saint, if either thee dislike.</body>
</message>

Now the routing entity (server) doesn't need to grovel around in the
child elements of the stanza in order to figure out how to route or
deliver the stanza.

Just a thought...

Peter

- --
Peter Saint-Andre
https://stpeter.im/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqmxFEACgkQNL8k5A2w/vzzWwCgtSTY1+JrHc5A2xMccdEPSXB3
314AoJDKFKDQNs8AThuim1qf0zISeYeX
=G2/A
-----END PGP SIGNATURE-----

Reply via email to