[Standards] Marking up messages with metadata and XEP-0071

Florian Schmaus flo at geekplace.eu
Thu Apr 9 16:52:11 UTC 2015


On 09.04.2015 06:10, Mel Adamaitis wrote:
> Problem:
> 
> In an XMPP IM client we are working on, it is necessary for mentions of
> other users (for alerting, highlighting) to be based on a normalised
> user identity, but displayed in a denormalized human-readable format.
> Additionally, for a particular denormalized identity, there may be any
> number of normalised identities. For example, user joe at example.com
> <mailto:joe at example.com>should be mentioned as Joe Bloggs. The
> relationship between the normalized and denormalized identities is known
> by the client authoring the message, and must be transmitted with the
> message for appropriate display and behaviour on the receiving end.

I'm not sure if I would extend/modify xep71 for that use-case. If I had
the requirement I would probably first try to mark the String and assign
a semantic to the marked String by using an extra extension element:

<message…>
  <body>Hi Joe Bloggs. How are you?</body>
  <mark>
    <mention jid='joe at example.com'>
      <by-string string='Joe Bloggs'/>
    </mention>
  </mark>
</message>

This has a few advantages:
- It doesn't mess with xep71
- It also works with clients who do not support xep71, i.e. just 'body'
elements.
- It splits the marking and the "assign semantic to mark" in two
different tasks


The last point basically means that the features of this extension could
be diverse. While I'm not sure if it's really a good idea to use it for
for anything and everything, it's good to have the option: For example

<message…>
  <body>Welsh looks like this: TI'n gallu ysgrifennu Cymraeg, ydy./body>
  <mark>
    <audio url='http://soundsoftheworld.com/welsh.mp3'>
      <by-range start='23' end='56'/>
    </mention>
  </mark>
</message>

- Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: OpenPGP digital signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20150409/e2ec3755/attachment.sig>


More information about the Standards mailing list