1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-24 10:12:19 -05:00

Merge pull request #1285 from mwild1/xep-0317-rev02

XEP-0317: New revision 0.2
This commit is contained in:
Kevin Smith 2023-07-04 14:23:37 +01:00 committed by GitHub
commit 992b490cf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,13 @@
<supersededby/> <supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname> <shortname>NOT_YET_ASSIGNED</shortname>
&stpeter; &stpeter;
&mwild;
<revision>
<version>0.2</version>
<date>2023-06-28</date>
<initials>mw</initials>
<remark><p>Select a syntax for hats.</p></remark>
</revision>
<revision> <revision>
<version>0.1</version> <version>0.1</version>
<date>2013-01-03</date> <date>2013-01-03</date>
@ -63,32 +70,14 @@
<item affiliation='owner' role='moderator'/> <item affiliation='owner' role='moderator'/>
</x> </x>
<hats xmlns='urn:xmpp:hats:0'> <hats xmlns='urn:xmpp:hats:0'>
<TeacherAssistant xmlns='http://tech.example.edu/hats' displayname='Teacher&apos; Assistant' xml:lang='en-us'/> <hat uri='http://tech.example.edu/hats#TeacherAssistant' title='Teacher&apos;s Assistant' xml:lang='en-us'/>
</hats> </hats>
</presence> </presence>
]]></example> ]]></example>
<p>Note: The format is open for debate. Possibilities include:</p> <p>Every hat is uniquely identified by its URI. Hats also carry a human-readable title for display purposes. Within XMPP, a hat is contained within a &lt;hat/> element in the 'urn:xmpp:hats:0' namespace. This element MUST possess a 'uri' attribute (containing the hat's URI), a 'title' attribute containing the name of the hat for display purposes, and MAY contain an 'xml:lang' attribute that identifies the language used in the 'title' attribute. The &lt;hat/> element MAY contain additional custom payloads defined by other XEPs, or payloads specific to an implementation or deployment.</p>
<ol> <p>Entities may have multiple hats. The &lt;hats/> element is defined as a container of zero or more &lt;hat/> elements.</p>
<li>
<p>XML element in the hats namespace with name as a URI:</p> <p>As noted, a participant can wear many hats. The following example shows a participant who is a MUC room owner and both a "host" and a "presenter" in an online meeting system. This system also demonstrates how hats can be annotated with custom information (here, the example &lt;badge/> element).</p>
<p>&lt;hat xmlns='urn:xmpp:hats:0' name='http://tech.example.edu/hats#TeacherAssistant' display='Teacher&amp;apos;s Assistant' xml:lang='en-us'/&gt;</p>
<p>Pro: Clients that don't understand the 'http://tech.example.edu/hats#TeacherAssistant' semantics can at least display a human-readable name. Names can be registered with the XMPP Registrar. Also appropriate as a field name in Ad-Hoc Commands.</p>
<p>Con: Not a very Jabberish way of structuring information.</p>
</li>
<li>
<p>XML element in the hats namespace with name scoped using Clark Notation:</p>
<p>&lt;hat xmlns='urn:xmpp:hats:0' name='{http://tech.example.edu/hats}TeacherAssistant' display='Teacher&amp;apos;s Assistant' xml:lang='en-us'/&gt;</p>
<p>Pro: Clients that don't understand the 'http://tech.example.edu/hats#TeacherAssistant' semantics can at least display a human-readable name. Names can be registered with the XMPP Registrar. Also integrates well with Ad-Hoc Commands.</p>
<p>Con: Not a very Jabberish way of structuring information.</p>
</li>
<li>
<p>XML element qualified by custom namespace:</p>
<p>&lt;TeacherAssistant xmlns='http://tech.example.edu/hats' displayname='Teacher&amp;apos;s Assistant' xml:lang='en-us'/&gt;</p>
<p>Pro: A more Jabberish way to structure information.</p>
<p>Con: Clients won't show anything if they don't understand the custom namespace.</p>
</li>
</ol>
<p>As noted, a participant can wear many hats. The following example shows a participant who is a MUC room owner and both a "host" and a "presenter" in an online meeting system.</p>
<example caption='Presence With Multiple Hats'><![CDATA[ <example caption='Presence With Multiple Hats'><![CDATA[
<presence <presence
from='meeting123@meetings.example.com/Harry' from='meeting123@meetings.example.com/Harry'
@ -98,8 +87,12 @@
<item affiliation='owner' role='moderator'/> <item affiliation='owner' role='moderator'/>
</x> </x>
<hats xmlns='urn:xmpp:hats:0'> <hats xmlns='urn:xmpp:hats:0'>
<hat displayName='Host' name='http://schemas.example.com/hats#host' xml:lang='en-us'/> <hat title='Host' uri='http://schemas.example.com/hats#host' xml:lang='en-us'>
<hat displayName='Presenter' name='http://schemas.example.com/hats#presenter' xml:lang='en-us'/> <badge xmlns="urn:example:badges" fgcolor="#000000" bgcolor="#58C5BA"/>
</hat>
<hat title='Presenter' uri='http://schemas.example.com/hats#presenter' xml:lang='en-us'>
<badge xmlns="urn:example:badges" fgcolor="#000000" bgcolor="#EC0524"/>
</hat>
</hats> </hats>
</presence> </presence>
]]></example> ]]></example>