Florian, my concerns with your approach are twofold: 1. It is complicated and is not markup in the sense that is used by XML, HTML, SSML, etc. Being abstracted means a complicated association step.
2. It does not accurately correlate. Imagine this example: <message…> <body>Hi Joe Bloggs. How are you? Oh, and you Joe Bloggs too?</body> <mark> <mention jid='j...@example.com'> <by-string string='Joe Bloggs'/> </mention> <mention jid='j...@example.com'> <by-string string='Joe Bloggs'/> </mention> </mark> </message> This obviously doesn't work, and is very much more complicated than simply permitting data-* attributes in the XEP-0071 security model (after updating to XHTML5, of course). On 9 April 2015 at 13:52, Florian Schmaus <f...@geekplace.eu> wrote: > 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 j...@example.com > > <mailto:j...@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='j...@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 > >