mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-12 20:35:13 -05:00
XEP-0317: New revision 0.2
Despite being a popular concept that the community keeps coming back to, this XEP has lingered in an unfinished state for some time. This small update fixes some of the fundamental issues. The current version did not actually specify a syntax for hats, as this was still under discussion at the time. Based on discussions with other community members, and personal implementation experience, this update specifies the syntax to be used.
This commit is contained in:
parent
675c73c859
commit
339e088256
43
xep-0317.xml
43
xep-0317.xml
@ -23,6 +23,13 @@
|
||||
<supersededby/>
|
||||
<shortname>NOT_YET_ASSIGNED</shortname>
|
||||
&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>
|
||||
<version>0.1</version>
|
||||
<date>2013-01-03</date>
|
||||
@ -63,32 +70,14 @@
|
||||
<item affiliation='owner' role='moderator'/>
|
||||
</x>
|
||||
<hats xmlns='urn:xmpp:hats:0'>
|
||||
<TeacherAssistant xmlns='http://tech.example.edu/hats' displayname='Teacher' Assistant' xml:lang='en-us'/>
|
||||
<hat uri='http://tech.example.edu/hats#TeacherAssistant' title='Teacher's Assistant' xml:lang='en-us'/>
|
||||
</hats>
|
||||
</presence>
|
||||
]]></example>
|
||||
<p>Note: The format is open for debate. Possibilities include:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>XML element in the hats namespace with name as a URI:</p>
|
||||
<p><hat xmlns='urn:xmpp:hats:0' name='http://tech.example.edu/hats#TeacherAssistant' display='Teacher&apos;s Assistant' xml:lang='en-us'/></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><hat xmlns='urn:xmpp:hats:0' name='{http://tech.example.edu/hats}TeacherAssistant' display='Teacher&apos;s Assistant' xml:lang='en-us'/></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><TeacherAssistant xmlns='http://tech.example.edu/hats' displayname='Teacher&apos;s Assistant' xml:lang='en-us'/></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>
|
||||
<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 <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 <hat/> element MAY contain additional custom payloads defined by other XEPs, or payloads specific to an implementation or deployment.</p>
|
||||
<p>Entities may have multiple hats. The <hats/> element is defined as a container of zero or more <hat/> elements.</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 <badge/> element).</p>
|
||||
<example caption='Presence With Multiple Hats'><![CDATA[
|
||||
<presence
|
||||
from='meeting123@meetings.example.com/Harry'
|
||||
@ -98,8 +87,12 @@
|
||||
<item affiliation='owner' role='moderator'/>
|
||||
</x>
|
||||
<hats xmlns='urn:xmpp:hats:0'>
|
||||
<hat displayName='Host' name='http://schemas.example.com/hats#host' xml:lang='en-us'/>
|
||||
<hat displayName='Presenter' name='http://schemas.example.com/hats#presenter' xml:lang='en-us'/>
|
||||
<hat title='Host' uri='http://schemas.example.com/hats#host' 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>
|
||||
</presence>
|
||||
]]></example>
|
||||
|
Loading…
Reference in New Issue
Block a user