[standards-jig] XHTML-IM (JEP-0071) and in-band images

Tomasz Sterna tomek at smoczy.net
Fri Jan 16 10:30:44 UTC 2004


Richard Dobson wrote:

>http://www.jabber.org/wiki/index.php/XHTML%20Inband%20Images?version=4
>Comments?
>  
>
Looks nice and simple. :-)
Good work Richard.


XMPP-CORE:
9.2.3 IQ Semantics
  Info/Query, or IQ, is a request-response mechanism [...]
[...]
  4. An entity that receives an IQ request of type "get" or "set" MUST 
reply with an IQ response of type "result" or "error" [...]

So we need to add an iq-response.

I also do not really like the attribute "hash". It should explain what 
the value is, not the technology used to generate it.
It could be any identifier as long, as the sender of the image is able 
to distinguish which file reciever wants.
I also think it belongs to the text field, not the attribute (similiary 
to the OOB protocol).
It's more natural and extensible this way.

I would like to rewrite it as:

<message type='chat' from='src at example.com/client' to='dest at example.com'>
    <body>Hello mate :-)</body>
    <html xmlns='http://jabber.org/protocol/xhtml-im'>
        <body xmlns='http://www.w3.org/1999/xhtml'>
            Hello mate <img src='cid:123456789'/>
        </body>
    </html>
    <obj xmlns='http://jabber.org/protocol/iobj' cid='123456789'>
        <fileid>552da749930852c69ae5d2141d3766b1</fileid>
    </obj>
</message>

and the iq-type is more like 'set' to initiate the action, not to 'get' 
some information in 'result' response
also changed the child of the iq set to <query/> element and added the 
resources in from/to.

2. Reciever Initiates Request-Response:

<iq type='set' from='dest at example.com/res' to='src at example.com/client' 
id='iobj1'>
    <query xmlns='http://jabber.org/protocol/iobj'>
        <fileid>552da749930852c69ae5d2141d3766b1</fileid>
    </query>
</iq>

3. Sender Acknowledges:

<iq type='result' from='src at example.com/client' 
to='dest at example.com/res' id='iobj1'/>

(or Informs Sender of Failure, like with OOB)

4. Sender Initiates a File Transfer (JEP-0096)






More information about the Standards mailing list