annotate xmpp/xep-proto-jid-mention.xml @ 105:b69056368901

docker: images optimisation: - reduced the number of layers by grouping many instructions - moved stuff which don't change a lot at the beginning, and hg/apt at the end - scripts are not now in scripts/ subdirectories - prosody.cfg.lua is added using ADD instead of getting it online - .hg/dirstate is copied in base (backend) and libervia, so mercurial revision is known - removed lot of useless WORKDIR instruction, they are replaced by "cd" inside RUN instructions - cleaning (apt-clean, rm) is done on the same instruction as the one than generate the data, to avoid useless data in layers
author Goffi <goffi@goffi.org>
date Sun, 28 Feb 2016 02:01:20 +0100
parents 16ce0419a0e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
1 <?xml version='1.0' encoding='UTF-8'?>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
2 <!DOCTYPE xep SYSTEM 'xep.dtd' [
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
3 <!ENTITY % ents SYSTEM 'xep.ent'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
4 %ents;
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
5 ]>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
6 <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
7 <xep>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
8 <header>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
9 <title>JID Mention</title>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
10 <abstract>This specification provides a way for an entity to mention a jid</abstract>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
11 &LEGALNOTICE;
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
12 <number>xxxx</number>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
13 <status>ProtoXEP</status>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
14 <type>Standards Track</type>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
15 <sig>Standards</sig>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
16 <approver>Council</approver>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
17 <dependencies>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
18 <spec>XMPP Core</spec>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
19 </dependencies>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
20 <supersedes/>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
21 <supersededby/>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
22 <shortname>NOT_YET_ASSIGNED</shortname>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
23 <author>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
24 <firstname>Jérôme</firstname>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
25 <surname>Poisson</surname>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
26 <email>goffi@goffi.org</email>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
27 <jid>goffi@jabber.fr</jid>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
28 </author>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
29
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
30 <revision>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
31 <version>0.1</version>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
32 <date>2016-01-16</date>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
33 <initials>jp</initials>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
34 <remark><p>First draft.</p></remark>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
35 </revision>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
36
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
37 </header>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
38 <section1 topic='Introduction' anchor='intro'>
75
d944c37c36fe xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents: 74
diff changeset
39 <p>Mentioning somebody is usually done in the context of a multi-user chat: a notification is triggered when somebody's nickname is written, and it often only works when a client is online and monitoring the conversation.</p>
d944c37c36fe xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents: 74
diff changeset
40 <p>But it is more and more common to mention people in other contexts (e.g. microblogging), and it is desirable that this works even when an entity is offline or not aware of the context. This XEP offers a simple solution to mention people in any context, online or offline and even outside of XMPP.</p>
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
41 </section1>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
42 <section1 topic='Requirements' anchor='reqs'>
75
d944c37c36fe xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents: 74
diff changeset
43 <p>JID mention must:</p>
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
44 <ul>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
45 <li>work online and offline</li>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
46 <li>work if the entity is not aware of the context</li>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
47 <li>work outside of XMPP context (e.g. in a website)</li>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
48 <li>not be tied to a particular syntax</li>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
49 <li>(desirable) be easy to implement</li>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
50 </ul>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
51 </section1>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
52 <section1 topic='Glossary' anchor='glossary'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
53 <ul>
75
d944c37c36fe xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents: 74
diff changeset
54 <li><strong>Mentioning entity</strong> the entity which wants to mention somebody.</li>
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
55 <li><strong>Mentioned entity</strong> the entity actually mentioned.</li>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
56 <li><strong>Mentioned URI</strong> URI where the entity is mentioned.</li>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
57 <li><strong>PubSub</strong> &xep0060;.</li>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
58 <li><strong>MUC</strong> &xep0045;.</li>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
59 <li><strong>MIX</strong> &xep0369;.</li>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
60 </ul>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
61 </section1>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
62 <section1 topic='Mentioning an entity' anchor='mention'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
63
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
64 <section2 topic='Basic syntax' anchor='base'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
65 <p>The syntax used by the software willing to mention a jid is up to the implemention. Nickname followed by "<strong>:</strong>" is commonly used in group chats like MUC or Internet Relay Chat (IRC) while "<strong>@</strong>" followed by nickname is often used with microblogging. Note that if it is not possible to associate a nickname with a jid without ambiguity, a bare jid SHOULD be used instead of a nickname.</p>
75
d944c37c36fe xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents: 74
diff changeset
66 <p>To mention an entity, a &MESSAGE; stanza must be sent to the bare jid of the entity with a &lt;mention/&gt; elements which MUST have the <strong>'urn:xmpp:mention:0'</strong> namespace. The &lt;mention/&gt; element MUST have a 'uri' attribute which links to the context where the entity has been mentioned. This URI can be the URI of a MUC room, a PubSub node, a Jingle file (e.g. a photo where mentioned entity appears), a website, or anything which makes sense. A &lt;body/&gt; element MUST be present with a human readable text indicating the mentioned URI (e.g. “You have been mentioned on xmpp:xsf@muc.xmpp.org?join”). No other elements or attributes are mandatory.</p>
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
67 <example caption='basic mention of Juliet'><![CDATA[
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
68 <message from='romeo@montage.net' to='juliet@capulet.lit' id='123'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
69 <mention xmlns='urn:xmpp:mention:0' uri='xmpp:balcony@chat.shakespeare.lit?join' />
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
70 <body>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
71 You have been mentioned on xmpp:balcony@chat.shakespeare.lit?join
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
72 </body>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
73 </message>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
74 ]]></example>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
75 </section2>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
76 <section2 topic='Context parents' anchor='parents'>
75
d944c37c36fe xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents: 74
diff changeset
77 <p>Sometime the 'uri' refers to an element which is a child of other one(s). For instance, a mentioned URI may refer to a website comment with a direct link, which is a part of a more general conversation, or PubSub URI refers to a microblog comment which is a child of another comment, itself a child of the main item.</p>
76
16ce0419a0e9 xep (jid mention): added "path" in Context parent description to make it more explicit + acknowledgements section
Goffi <goffi@goffi.org>
parents: 75
diff changeset
78 <p>In this case, it is desirable for the mentioned entity to know where is the main item, so it can understand the whole context. To deal with this, the mentioning entity MAY declare the path to the uri by adding a &lt;parents/&gt; element which MUST contain one or more &lt;parent/&gt; elements. Each &lt;parent/&gt; element MUST contain an 'uri' attribute with the URI of the parent. If more than one parents are specified, they MUST be put in order, from the more distant one to the last child just before the one specified in the main &lt;mention/&gt; element.</p>
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
79 <example caption='mention of Juliet in microblog comments'><![CDATA[
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
80 <message from='romeo@montage.net' to='juliet@capulet.lit' id='123'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
81 <mention xmlns='urn:xmpp:mention:0' uri='xmpp:pubsub.montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%2Fdd88c9bc58886fce0049ed050df0c5f2'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
82 <parents>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
83 <parent uri='xmpp:romeo%40montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0;item=2ze57d9c-1c46-21df-830c-002143d3d2qgf' />
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
84 </parents>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
85 </mention>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
86 <body>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
87 You have been mentioned on xmpp:pubsub.montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%2Fdd88c9bc58886fce0049ed050df0c5f2
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
88 </body>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
89 </message>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
90 ]]></example>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
91 </section2>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
92 <section2 topic='Context hint' anchor='context'>
75
d944c37c36fe xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents: 74
diff changeset
93 <p>To help the mentioned entity understand the context, the mentioning entity MAY add a &lt;context&gt; element which include human readable text. What is inside is at the discretion of the mentioning entity, it MAY be the paragraph where the entity is mentioned, or anything useful.</p>
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
94 <example caption='mention with context hint'><![CDATA[
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
95 <message from='juliet@capulet.lit' to='romeo@montage.net' id='123'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
96 <mention xmlns='urn:xmpp:mention:0' uri='xmpp:balcony@chat.shakespeare.lit?join'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
97 <context>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
98 O Romeo, Romeo! wherefore art thou Romeo?
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
99 Deny thy father and refuse thy name!
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
100 Or, if thou wilt not, be but sworn my love,
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
101 And I'll no longer be a Capulet.
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
102 </context>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
103 </mention>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
104 <body>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
105 You have been mentioned on xmpp:balcony@chat.shakespeare.lit?join
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
106 </body>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
107 </message>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
108 ]]></example>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
109 </section2>
74
8807a553e5bf xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents: 73
diff changeset
110 <section2 topic='Mention author' anchor='author'>
75
d944c37c36fe xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents: 74
diff changeset
111 <p>If the mention is done outside of XMPP context (e.g.: on a website), the 'from' attribute of the message may be the jid of a server component or a bot. In this case, the mentioning entity can give information on the real author of the mention.</p>
74
8807a553e5bf xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents: 73
diff changeset
112 <p>The author of the mention MAY be specified in &lt;author/&gt; element. If present, it MUST contain one or more of the following elements:</p>
8807a553e5bf xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents: 73
diff changeset
113 <ul>
8807a553e5bf xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents: 73
diff changeset
114 <li><em>JID</em> the user jid, in a &lt;jid/&gt; element</li>
8807a553e5bf xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents: 73
diff changeset
115 <li><em>email</em> the user email address, in a &lt;email/&gt; element</li>
8807a553e5bf xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents: 73
diff changeset
116 <li><em>Full Name</em> the user full name, in a &lt;name/&gt; element</li>
8807a553e5bf xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents: 73
diff changeset
117 <li><em>Nickname</em> the user nickname, in a &lt;nick/&gt; element</li>
8807a553e5bf xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents: 73
diff changeset
118 </ul>
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
119 <example caption='mention with its author'><![CDATA[
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
120 <message from='xmpp_bot.shakespeare.example.net' to='juliet@capulet.lit' id='123'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
121 <mention xmlns='urn:xmpp:mention:0' uri='https://www.ball.shakespeare.example.net'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
122 <author>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
123 <name>Lord Capulet</name>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
124 <jid>capulet@capulet.lit</jid>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
125 </author>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
126 </mention>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
127 <body>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
128 You have been mentioned on xmpp:balcony@chat.shakespeare.lit?join
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
129 </body>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
130 </message>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
131 ]]></example>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
132 </section2>
73
d8d98e13aae9 xep (jid mention): fixed a typo
Goffi <goffi@goffi.org>
parents: 72
diff changeset
133 <section2 topic='Mentioned part' anchor='part'>
75
d944c37c36fe xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents: 74
diff changeset
134 <p>In some contexts, an URI may not be sufficient to locate the exact place of the mention. For instance, it may be useful to know the exact message of a MUC room where the mention did take place. If a mentioning entity wants to specify the exact part of the location where the mention happened, it MAY use a &lt;part/&gt; element. This element contains information dependent on the mentioned URI. For now, only stanza-id is used, but later versions of this specification, or other XEPs can add new elements.</p>
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
135 <p>If the mentioned URI refers to an XMPP context (e.g. a MUC room), a stanza id can be specified. To do so, the &xep0359; semantic is used: mentioning entity MAY add a &lt;stanza-id/&gt; element to the &lt;part/&gt; element as specified in XEP-0359.</p>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
136 <example caption='mention with context hint'><![CDATA[
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
137 <message from='juliet@capulet.lit' to='romeo@montage.net' id='123'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
138 <mention xmlns='urn:xmpp:mention:0' uri='xmpp:balcony@chat.shakespeare.lit?join'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
139 <context>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
140 O Romeo, Romeo! wherefore art thou Romeo?
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
141 Deny thy father and refuse thy name!
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
142 Or, if thou wilt not, be but sworn my love,
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
143 And I'll no longer be a Capulet.
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
144 </context>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
145 <part>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
146 <stanza-id xmlns='urn:xmpp:sid:0'
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
147 id='4b3ec1b6-10ca-498a-af20-378ffaaafddd'
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
148 by='balcony@chat.shakespeare.lit'/>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
149 </part>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
150 </mention>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
151 <body>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
152 You have been mentioned on xmpp:balcony@chat.shakespeare.lit?join
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
153 </body>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
154 </message>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
155 ]]></example>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
156 </section2>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
157 </section1>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
158
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
159 <section1 topic='Configuration' anchor='configuration'>
75
d944c37c36fe xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents: 74
diff changeset
160 <p>A server MAY provide a way for clients to configure their notifications (e.g. send by email instead of XMPP, accept mentions only from entities in the roster). To do so, the &xep0050; is used on the well-defined command node <strong>'urn:xmpp:mention:0#configure'</strong>.</p>
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
161 </section1>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
162
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
163
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
164 <section1 topic='Discovering Support' anchor='disco'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
165 <section2 topic='Announce' anchor='disco_announce'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
166 <p>If a entity supports the JID mention protocol, it MUST report that fact by including a service discovery feature of "<em>urn:xmpp:mention:0</em>" in response to a &xep0030; information request:</p>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
167 <example caption="service discovery information request"><![CDATA[
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
168 <iq from='kingclaudius@shakespeare.lit/castle'
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
169 id='disco1'
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
170 to='laertes@shakespeare.lit/castle'
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
171 type='get'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
172 <query xmlns='http://jabber.org/protocol/disco#info'/>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
173 </iq>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
174 ]]></example>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
175 <example caption="service discovery information response"><![CDATA[
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
176 <iq from='laertes@shakespeare.lit/castle'
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
177 id='disco1'
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
178 to='kingclaudius@shakespeare.lit/castle'
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
179 type='result'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
180 <query xmlns='http://jabber.org/protocol/disco#info'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
181 ...
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
182 <feature var='urn:xmpp:mention:0'/>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
183 ...
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
184 </query>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
185 </iq>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
186 ]]></example>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
187 </section2>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
188 <section2 topic='Configuration' anchor='disco_config'>
75
d944c37c36fe xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents: 74
diff changeset
189 <p>A server doesn't have to announce JID mention namespace as it is a client feature, but if it offers a configuration node as specified in the <link url='#configuration'>configuration section</link>, it MUST announce this fact by including a service discovery feature of "<em>urn:xmpp:mention:0#configure</em>".</p>
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
190 </section2>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
191 </section1>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
192
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
193 <section1 topic='Business Rules' anchor='rules'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
194 <ol>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
195 <li>In the case of group chat like MUC or MIX, most of clients already monitor conversations and notify the user if he is mentioned. To avoid to deal with double notifications, the mentioning entity SHOULD NOT mention an other entity using this XEP if the mentioned entity is online and following the conversation (i.e. it joined the MUC room or it subscribed to the MIX conversation).</li>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
196 <li>On the other hand, if the mentioned entity is not following the conversation (i.e. it didn't joined the MUC room, or it didn't subscribed to the MIX conversation), the mentioning entity SHOULD use this XEP for the mention.</li>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
197 </ol>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
198 </section1>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
199 <section1 topic='Security Considerations' anchor='security'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
200 <ol>
75
d944c37c36fe xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents: 74
diff changeset
201 <li>To avoid spamming (e.g. a mention of an entity redirecting to an advertisement), a server SHOULD allow a mentioned entity to black list mentioning entities, or to accept mentions only from some entities (e.g. entities in roster). See the <link url='#configuration'>configuration section</link> to see how to set it up. A client MAY offer the same kind of feature, but filtering is preferably done on server side to avoid useless traffic.</li>
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
202 <li>As a mention can link to malicious content, or a user may not want to join a context (and show its presence at the same time), a client SHOULD NOT open automatically the mentioned URI. Instead it SHOULD show a notification to the user, with context hint when available, and propose to join the context or not.</li>
74
8807a553e5bf xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents: 73
diff changeset
203 <li>When an author is specified as explained in <link url='#author'>mention author section</link>, the elements, notably the &lt;jid&gt; element, are not checked. A malicious mentioning entity could use fake author information to fool mentioned entity. To avoid this, the mentioned entity's client SHOULD display a warning, like an icon or a message, to indicate that the author can't be checked.</li>
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
204 </ol>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
205 </section1>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
206 <section1 topic='IANA Considerations' anchor='iana'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
207 <p>This document requires no interaction with &IANA;.</p>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
208 </section1>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
209 <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
210 <section2 topic='Protocol Namespaces' anchor='ns'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
211 <p>The &REGISTRAR; includes 'urn:xmpp:mention:0' in its registry of protocol namespaces (see &NAMESPACES;).</p>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
212 <ul>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
213 <li>urn:xmpp:mention:0</li>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
214 </ul>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
215 </section2>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
216 <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
217 &NSVER;
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
218 </section2>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
219 </section1>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
220 <section1 topic='XML Schema' anchor='schema'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
221 <code><![CDATA[
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
222 <?xml version='1.0' encoding='UTF-8'?>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
223
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
224 <xs:schema
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
225 xmlns:xs='http://www.w3.org/2001/XMLSchema'
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
226 targetNamespace='urn:xmpp:mention:0'
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
227 xmlns='urn:xmpp:mention:0'
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
228 elementFormDefault='qualified'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
229
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
230 <xs:import namespace='urn:xmpp:sid:1'
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
231 schemaLocation='http://xmpp.org/schemas/sid.xsd'/>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
232
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
233 <xs:element name='mention'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
234 <xs:complexType>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
235 <xs:attribute name='uri' use='required' type='xs:string'/>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
236 <xs:element name='parents' minOccurs='0' maxOccurs='1'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
237 <xs:element name='parent' minOccurs='1' maxOccurs='unbounded'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
238 <xs:attribute name='uri' use='required' type='xs:string'/>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
239 </xs:element>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
240 </xs:element>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
241 <xs:element name='context' minOccurs='0' maxOccurs='1'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
242 <xs:complexType>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
243 <xs:simpleContent>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
244 <xs:extension base='xs:string' />
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
245 </xs:simpleContent>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
246 </xs:complexType>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
247 </xs:element>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
248 <xs:element name='author' minOccurs='0' maxOccurs='1'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
249 <xs:complexType>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
250 <xs:sequence>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
251 <xs:choice minOccurs='1' maxOccurs='unbounded'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
252 <xs:element ref='jid'/>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
253 <xs:element ref='email'/>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
254 <xs:element ref='name'/>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
255 <xs:element ref='nick'/>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
256 </xs:choice>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
257 </xs:sequence>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
258 </xs:complexType>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
259 </xs:element>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
260 <xs:element name='part' minOccurs='0' maxOccurs='1'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
261 <xs:complexType>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
262 <xs:sequence>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
263 <xs:choice minOccurs='1' maxOccurs='unbounded'>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
264 <xs:element ref='urn:xmpp:sid:1' />
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
265 </xs:choice>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
266 </xs:sequence>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
267 </xs:complexType>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
268 </xs:element>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
269 </xs:complexType>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
270 </xs:element>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
271 </xs:schema>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
272 ]]></code>
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
273 </section1>
76
16ce0419a0e9 xep (jid mention): added "path" in Context parent description to make it more explicit + acknowledgements section
Goffi <goffi@goffi.org>
parents: 75
diff changeset
274
16ce0419a0e9 xep (jid mention): added "path" in Context parent description to make it more explicit + acknowledgements section
Goffi <goffi@goffi.org>
parents: 75
diff changeset
275 <section1 topic='Acknowledgements' anchor='acks'>
16ce0419a0e9 xep (jid mention): added "path" in Context parent description to make it more explicit + acknowledgements section
Goffi <goffi@goffi.org>
parents: 75
diff changeset
276 <p>Thanks to Adrien Cossa for his review/corrections.</p>
16ce0419a0e9 xep (jid mention): added "path" in Context parent description to make it more explicit + acknowledgements section
Goffi <goffi@goffi.org>
parents: 75
diff changeset
277 </section1>
16ce0419a0e9 xep (jid mention): added "path" in Context parent description to make it more explicit + acknowledgements section
Goffi <goffi@goffi.org>
parents: 75
diff changeset
278
72
c9640163a55c xep: JID mention first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
279 </xep>