[jdev] Application-specific payload in messages
hyperstruct - jdev
iolgzc102 at sneakemail.com
Sun Mar 25 15:52:27 CDT 2007
Hi,
given an application that has to exchange a "foo" message with another
instance of the application (or any foo-aware entity), I have seen the
following two styles used:
<message to="app at server.org">
<x xmlns="http://bar.org/protocol">
<foo/>
</x>
</message>
<message to="app at server.org">
<foo xmlns="http://bar.org/protocol"/>
</message>
RFC3921 states that "[t]his child element MAY have any name and MUST
possess an 'xmlns' namespace declaration (other than "jabber:client",
"jabber:server", or "http://etherx.jabber.org/streams") that defines
all data contained within the child element", so it seems to be a
matter of style.
Are there practical differences between the two styles? Is there a
preferred one?
--
Massimiliano Mirra
code: http://dev.hyperstruct.net
blog: http://blog.hyperstruct.net
More information about the JDev
mailing list