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

Peter Saint-Andre stpeter at stpeter.im
Mon Nov 19 22:24:19 UTC 2007


Peter Saint-Andre wrote:
> 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>

OK I've checked these changes into SVN:

http://svn.xmpp.org:18080/browse/XMPP/trunk/extensions/xep-0155.xml?r1=863&r2=1394

The rendered version is here:

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

Peter

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

-------------- 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/20071119/74c671f9/attachment.bin>


More information about the Standards mailing list