No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0083.xml 7.3KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM "xep.ent">
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Nested Roster Groups</title>
  10. <abstract>This document defines an XMPP protocol extension that enables nested sub-groups to exist within the Jabber roster, while retaining backwards compatibility and ensuring that the roster remains usable by all clients.</abstract>
  12. <number>0083</number>
  13. <status>Active</status>
  14. <type>Informational</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. <spec>XMPP IM</spec>
  19. <spec>XEP-0049</spec>
  20. </dependencies>
  21. <supersedes/>
  22. <supersededby/>
  23. <shortname>nestedgroups</shortname>
  24. <schemaloc>
  25. <url></url>
  26. </schemaloc>
  27. <author>
  28. <firstname>Rachel</firstname>
  29. <surname>Blackman</surname>
  30. <email></email>
  31. <jid></jid>
  32. </author>
  33. <revision>
  34. <version>1.0</version>
  35. <date>2004-10-11</date>
  36. <initials>psa</initials>
  37. <remark>Per a vote of the Jabber Council, advanced to a status of Active.</remark>
  38. </revision>
  39. <revision>
  40. <version>0.1</version>
  41. <date>2003-05-05</date>
  42. <initials>rcb</initials>
  43. <remark>Initial version.</remark>
  44. </revision>
  45. </header>
  46. <section1 topic='Introduction' anchor='intro'>
  47. <p>In many modern instant messaging clients, client authors implement a way to nest contact groups within other contact groups. Usually this is implemented on the client side, since many instant messaging networks do not support nesting contact groups in this manner. The limitation of this system is that if the user changes from one client to another, or even a second installation of the same client, the user loses all of his or her sub-group information. This document aims to solve that problem within Jabber, by providing for a way to store sub-groups on the Jabber roster without breaking existing clients.</p>
  48. </section1>
  49. <section1 topic='roster:delimiter Namespace' anchor='namespace'>
  50. <p>Jabber already provides a useful method for storing client data on the server using &xep0049;. All we need to do is create a new roster element and a namespace to store the delimiter for nested groups, roster:delimiter. This element MUST contain XML character data that defines a string to be used as a delimiter in the roster groups. <note>If the element does not contain XML character data, a compliant client SHOULD assume that nested groups are disabled for the user's account.</note></p>
  51. <p>A single-character roster delimiter (e.g., "/") would make client implementation easier, but be more limiting to the end-user in terms of choices for naming roster groups, so a string is ideal. Therefore, the delimiter SHOULD contain multiple characters in order to avoid inconveniencing the user, but single-character delimiters MUST be honored by the client. The exception is if the delimiter is a single alphanumeric character (a-z, A-Z, 0-9); in this case compliant clients MUST treat the situation as if nesting were disabled, to avoid malicious use of this element by setting 'e' or 'm' or some other common single character as a delimiter.</p>
  52. <p>A compliant client SHOULD ask for the nested delimiter before requesting the user's roster, in order to know whether or not to parse the roster 'group' fields accordingly. If there is no delimiter stored, a client MAY set a delimiter but MUST either prompt the user for a delimiter, or use a user-configurable default.</p>
  53. </section1>
  54. <section1 topic='Use Cases' anchor='usecases'>
  55. <p>Use cases for this extension are straightforward, and are shown below as examples.</p>
  56. <section2 topic='Querying for the delimiter' anchor='usecases-query'>
  57. <p>All compliant clients SHOULD query for an existing delimiter at login.</p>
  58. <example caption='Querying for the Delimiter'><![CDATA[
  59. CLIENT:
  60. <iq type='get'
  61. id='1'>
  62. <query xmlns='jabber:iq:private'>
  63. <roster xmlns='roster:delimiter'/>
  64. </query>
  65. </iq>
  66. SERVER:
  67. <iq type='result'
  68. id='1'
  69. from='bill@shakespeare.lit/Globe'
  70. to='bill@shakespeare.lit/Globe'>
  71. <query xmlns='jabber:iq:private'>
  72. <roster xmlns='roster:delimiter'>::</roster>
  73. </query>
  74. </iq>
  75. ]]></example>
  76. </section2>
  77. <section2 topic='Retrieving the Roster' anchor='usecases-retrieve'>
  78. <p>Now that the client has a delimiter, we can retrieve and parse the roster properly.</p>
  79. <example caption='Retrieving a Roster with Nested Groups'><![CDATA[
  80. CLIENT:
  81. <iq type='get'
  82. id='2'>
  83. <query xmlns='jabber:iq:roster'/>
  84. </iq>
  85. SERVER:
  86. <iq type='result'
  87. to='bill@shakespeare.lit/Globe'
  88. id='2'>
  89. <query xmlns='jabber:iq:roster'>
  90. <item jid='' subscription='both'>
  91. <group>Midsummer::Actors</group>
  92. </item>
  93. <item jid='' subscription='both'>
  94. <group>Midsummer::Actors</group>
  95. </item>
  96. <item jid='' subscription='both'>
  97. <group>Midsummer::Actors</group>
  98. </item>
  99. <item jid='' subscription='both'>
  100. <group>Midsummer::Royalty</group>
  101. </item>
  102. <item jid='' subscription='both'>
  103. <group>Midsummer::Royalty</group>
  104. </item>
  105. <item jid='' subscription='both'>
  106. <group>Midsummer</group>
  107. </item>
  108. <item jid='' subscription='both'>
  109. <group>Hamlet</group>
  110. </item>
  111. <item jid='' subscription='both'>
  112. <group>Hamlet</group>
  113. </item>
  114. </query>
  115. </iq>
  116. ]]></example>
  117. <p>Bottom, Quince and Snug should be grouped together in a group 'Actors' underneath the group 'Midsummer'. Theseus and Hippolyta should be grouped together in a group 'Royalty' under 'Midsummer'. Robin Goodfellow, meanwhile, being in a class unto himself, is a plain contact under the 'Midsummer' group rather than in an actual sub-group. The group Hamlet, containing only one melancholy prince and his mother, contains no sub-groups at all.</p>
  118. <p>As should be apparent, a client which does not support the delimiter will instead create a separate group -- such as 'Midsummer::Actors' -- and thus will still have each set of contacts grouped with the other appropriate contacts.</p>
  119. </section2>
  120. </section1>
  121. <section1 topic='Security Considerations' anchor='security'>
  122. <p>There are no security features or concerns related to this proposal above and beyond those specified for roster management in &xmppim; and for private XML storage in XEP-0049.</p>
  123. </section1>
  124. <section1 topic='IANA Considerations' anchor='iana'>
  125. <p>This document requires no interaction with &IANA;.</p>
  126. </section1>
  127. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  128. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  129. <p>The &REGISTRAR; includes 'roster:delimiter' in its registry of protocol namespaces.</p>
  130. </section2>
  131. </section1>
  132. <section1 topic='Schema' anchor='schema'>
  133. <code><![CDATA[
  134. <?xml version='1.0' encoding='UTF-8'?>
  135. <xs:schema
  136. xmlns:xs=''
  137. targetNamespace='roster:delimiter'
  138. xmlns='roster:delimiter'>
  139. <xs:annotation>
  140. <xs:documentation>
  141. The protocol documented by this schema is defined in
  142. XEP-0083:
  143. </xs:documentation>
  144. </xs:annotation>
  145. <xs:element name='roster' type='xs:string'/>
  146. </xs:schema>
  147. ]]></code>
  148. </section1>
  149. </xep>