[Standards] XEP-0155: <body/> text

Peter Saint-Andre stpeter at stpeter.im
Mon Nov 12 22:45:51 UTC 2007


In working on a mapping [1] of XMPP chat sessions to the Message Session
Relay Protocol [2], I discovered that the use of a <body/> element in
XEP-0155 is problematic:

http://www.xmpp.org/extensions/xep-0155.html

This usage is disallowed when initiating a session negotiation but
allowed when rejecting a session request, completing the negotiation, or
cancelling the negotiation. Consider Example 3 in the current spec:

Example 3. Contact declines offer and specifies reason

<message type='normal'
         from='juliet at capulet.com/balcony'
         to='romeo at montague.net/orchard'>
  <thread>ffd7076498744578d10edabfe7f4a866</thread>
  <feature xmlns='http://jabber.org/protocol/feature-neg'>
    <x xmlns='jabber:x:data' type='submit'>
      <field var='FORM_TYPE'>
        <value>urn:xmpp:ssn</value>
      </field>
      <field var='accept'><value>0</value></field>
    </x>
  </feature>
  <body>Sorry, can't chat now! How about tonight?</body>
</message>

For one thing, I think this violates the message stanza profiles we have
started to define in XEP-0226:

http://www.xmpp.org/extensions/xep-0226.html

This makes client-side processing more complex (does the client show the
<body/> as a normal message?). It also complicates handling of such a
message by a SIP gateway.

I think it would be much better to define a data form field called
"reason" and to include the text there:

Example 3'. Contact declines offer and specifies reason

<message type='normal'
         from='juliet at capulet.com/balcony'
         to='romeo at montague.net/orchard'>
  <thread>ffd7076498744578d10edabfe7f4a866</thread>
  <feature xmlns='http://jabber.org/protocol/feature-neg'>
    <x xmlns='jabber:x:data' type='submit'>
      <field var='FORM_TYPE'>
        <value>urn:xmpp:ssn</value>
      </field>
      <field var='accept'><value>0</value></field>
      <field var='reason'>
        <value>
          Sorry, can't chat now! How about tonight?
        </value>
      </field>
    </x>
  </feature>
</message>

Thoughts?

/psa

[1] http://tools.ietf.org/html/draft-saintandre-xmpp-msrp

[2] http://tools.ietf.org/html/rfc4975


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7338 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20071112/7e98fa43/attachment.bin>


More information about the Standards mailing list