[Standards] Marking up messages with metadata and XEP-0071
flo at geekplace.eu
Thu Apr 9 16:52:11 UTC 2015
On 09.04.2015 06:10, Mel Adamaitis wrote:
> 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:
<body>Hi Joe Bloggs. How are you?</body>
<mention jid='joe at example.com'>
<by-string string='Joe Bloggs'/>
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'
- It splits the marking and the "assign semantic to mark" in two
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
<body>Welsh looks like this: TI'n gallu ysgrifennu Cymraeg, ydy./body>
<by-range start='23' end='56'/>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 603 bytes
Desc: OpenPGP digital signature
More information about the Standards