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-0306.xml 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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>Extensible Status Conditions for Multi-User Chat</title>
  10. <abstract>This document defines an extensible format for status conditions in Multi-User Chat, similar to the error format used in the core of XMPP.</abstract>
  11. &LEGALNOTICE;
  12. <number>0306</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>RFC 6120</spec>
  18. <spec>XEP-0045</spec>
  19. </dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>N/A</shortname>
  23. &stpeter;
  24. <revision>
  25. <version>0.2.1</version>
  26. <date>2016-06-07</date>
  27. <initials>mp (XEP Editor: ssw)</initials>
  28. <remark><p>Fix broken example XML.</p></remark>
  29. </revision>
  30. <revision>
  31. <version>0.2</version>
  32. <date>2011-12-14</date>
  33. <initials>psa</initials>
  34. <remark><p>Modified format to make it more backward compatible; incremented protocol namespace.</p></remark>
  35. </revision>
  36. <revision>
  37. <version>0.1</version>
  38. <date>2011-08-26</date>
  39. <initials>psa</initials>
  40. <remark><p>Initial published version.</p></remark>
  41. </revision>
  42. <revision>
  43. <version>0.0.1</version>
  44. <date>2011-08-12</date>
  45. <initials>psa</initials>
  46. <remark><p>Rough draft.</p></remark>
  47. </revision>
  48. </header>
  49. <section1 topic='Introduction' anchor='intro'>
  50. <p>Traditionally, &xep0045; has used numerical status codes similar to those used in HTTP and SMTP. Numerical codes were deprecated in the core of XMPP by &rfc3920; and are no longer even defined in the core schemas provided in &rfc6120; (see also &xep0086;). In an effort to modernize the Multi-User Chat (MUC) protocol, this document defines an extensible format for status conditions in MUC.</p>
  51. </section1>
  52. <section1 topic='Format' anchor='format'>
  53. <p>XML elements describing status conditions defined by this specification SHALL be qualified by the 'urn:xmpp:muc:conditions:1' namespace.</p>
  54. <p>The structure is as follows:</p>
  55. <code><![CDATA[
  56. <status xmlns='http://jabber.org/protocol/muc#user'>
  57. <DEFINED-CONDITION>
  58. [<text xml:lang='langcode'>OPTIONAL descriptive text</text>]
  59. [OPTIONAL application-specific condition element]
  60. </DEFINED-CONDITION>
  61. [<DEFINED-CONDITION/>]
  62. [OPTIONAL application-specific condition element or elements]
  63. </status>
  64. ]]></code>
  65. <p>That is, any &lt;status/&gt; element qualified by the existing http://jabber.org/protocol/muc#user' namespace (from XEP-0045) MAY contain one or more condition elements defined in this document (each of which MAY contain a human-readable &lt;text/&gt; element and MAY contain an application-specific condition element) and MAY contain one or more application-specific condition elements.</p>
  66. <p>An example follows.</p>
  67. <example caption="Service Sends New Occupant's Presence to New Occupant"><![CDATA[
  68. <presence
  69. from='coven@chat.shakespeare.lit/thirdwitch'
  70. id='n13mt3l'
  71. to='hag66@shakespeare.lit/pda'>
  72. <x xmlns='http://jabber.org/protocol/muc#user'>
  73. <item affiliation='member' role='participant'/>
  74. <status code='100'>
  75. <realjid-public xmlns='urn:xmpp:muc:conditions:1'/>
  76. </status>
  77. <status code='110'>
  78. <self-presence xmlns='urn:xmpp:muc:conditions:1'/>
  79. </status>
  80. </x>
  81. </presence>
  82. ]]></example>
  83. </section1>
  84. <section1 topic='Mapping of Existing Codes' anchor='mapping'>
  85. <p>The following table maps the existing numerical status codes (registered with the &REGISTRAR; at &MUCSTATUS;) to XML elements.</p>
  86. <table caption='Error Codes for http://jabber.org/protocol/muc#user Namespace'>
  87. <tr>
  88. <th>Code</th>
  89. <th>Element</th>
  90. </tr>
  91. <tr>
  92. <td>100</td>
  93. <td>&lt;realjid-public/&gt;</td>
  94. </tr>
  95. <tr>
  96. <td>101</td>
  97. <td>&lt;affiliation-changed/&gt;</td>
  98. </tr>
  99. <tr>
  100. <td>102</td>
  101. <td>&lt;unavailable-shown/&gt;</td>
  102. </tr>
  103. <tr>
  104. <td>103</td>
  105. <td>&lt;unavailable-not-shown/&gt;</td>
  106. </tr>
  107. <tr>
  108. <td>104</td>
  109. <td>&lt;configuration-changed/&gt;</td>
  110. </tr>
  111. <tr>
  112. <td>110</td>
  113. <td>&lt;self-presence/&gt;</td>
  114. </tr>
  115. <tr>
  116. <td>170</td>
  117. <td>&lt;logging-enabled/&gt;</td>
  118. </tr>
  119. <tr>
  120. <td>171</td>
  121. <td>&lt;logging-disabled/&gt;</td>
  122. </tr>
  123. <tr>
  124. <td>172</td>
  125. <td>&lt;non-anonymous/&gt;</td>
  126. </tr>
  127. <tr>
  128. <td>173</td>
  129. <td>&lt;semi-anonymous/&gt;</td>
  130. </tr>
  131. <tr>
  132. <td>174</td>
  133. <td>&lt;fully-anonymous/&gt;</td>
  134. </tr>
  135. <tr>
  136. <td>201</td>
  137. <td>&lt;room-created/&gt;</td>
  138. </tr>
  139. <tr>
  140. <td>210</td>
  141. <td>&lt;nick-assigned/&gt;</td>
  142. </tr>
  143. <tr>
  144. <td>301</td>
  145. <td>&lt;banned/&gt;</td>
  146. </tr>
  147. <tr>
  148. <td>303</td>
  149. <td>&lt;new-nick/&gt;</td>
  150. </tr>
  151. <tr>
  152. <td>307</td>
  153. <td>&lt;kicked/&gt;</td>
  154. </tr>
  155. <tr>
  156. <td>321</td>
  157. <td>&lt;removed-affiliation/&gt;</td>
  158. </tr>
  159. <tr>
  160. <td>322</td>
  161. <td>&lt;removed-membership/&gt;</td>
  162. </tr>
  163. <tr>
  164. <td>332</td>
  165. <td>&lt;removed-shutdown/&gt;</td>
  166. </tr>
  167. </table>
  168. </section1>
  169. <section1 topic='Security Considerations' anchor='security'>
  170. <p>The security considerations of <cite>XEP-0045</cite> apply.</p>
  171. </section1>
  172. <section1 topic='IANA Considerations' anchor='iana'>
  173. <p>This document requires no interaction with &IANA;.</p>
  174. </section1>
  175. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  176. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  177. <p>This specification defines the following XML namespace:</p>
  178. <ul>
  179. <li>urn:xmpp:muc:conditions:1</li>
  180. </ul>
  181. <p>Upon advancement of this specification from a status of Experimental to a status of Draft, the &REGISTRAR; shall add the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
  182. </section2>
  183. <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
  184. &NSVER;
  185. </section2>
  186. <section2 topic='MUC Status Codes Registry' anchor='registrar-mucstatus'>
  187. <p>The XMPP Registrar is requested to add the elements defined in this specification to the existing registry for MUC status codes at &MUCSTATUS;.</p>
  188. </section2>
  189. </section1>
  190. <section1 topic='XML Schema' anchor='schema'>
  191. <code><![CDATA[
  192. <?xml version='1.0' encoding='UTF-8'?>
  193. <xs:schema
  194. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  195. targetNamespace='urn:xmpp:muc:conditions:1'
  196. xmlns='urn:xmpp:muc:conditions:1'
  197. elementFormDefault='qualified'>
  198. <xs:element name='affiliation-changed' type='MucStatusType'/>
  199. <xs:element name='banned' type='MucStatusType'/>
  200. <xs:element name='configuration-changed' type='MucStatusType'/>
  201. <xs:element name='fully-anonymous' type='MucStatusType'/>
  202. <xs:element name='kicked' type='MucStatusType'/>
  203. <xs:element name='logging-disabled' type='MucStatusType'/>
  204. <xs:element name='logging-enabled' type='MucStatusType'/>
  205. <xs:element name='new-nick' type='MucStatusType'/>
  206. <xs:element name='nick-assigned' type='MucStatusType'/>
  207. <xs:element name='non-anonymous' type='MucStatusType'/>
  208. <xs:element name='realjid-public' type='MucStatusType'/>
  209. <xs:element name='removed-affiliation' type='MucStatusType'/>
  210. <xs:element name='removed-membership' type='MucStatusType'/>
  211. <xs:element name='removed-shutdown' type='MucStatusType'/>
  212. <xs:element name='room-created' type='MucStatusType'/>
  213. <xs:element name='self-presence' type='MucStatusType'/>
  214. <xs:element name='semi-anonymous' type='MucStatusType'/>
  215. <xs:element name='unavailable-not-shown' type='MucStatusType'/>
  216. <xs:element name='unavailable-shown' type='MucStatusType'/>
  217. <xs:complexType name='MucStatusType'>
  218. <xs:sequence>
  219. <xs:element ref='text'/>
  220. <xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded' processContents='lax'/>
  221. </xs:sequence>
  222. </xs:complexType>
  223. </xs:schema>
  224. <xs:element name='text'>
  225. <xs:complexType>
  226. <xs:simpleContent>
  227. <xs:extension base='xs:string'>
  228. <xs:attribute ref='xml:lang' use='optional'/>
  229. </xs:extension>
  230. </xs:simpleContent>
  231. </xs:complexType>
  232. </xs:element>
  233. ]]></code>
  234. </section1>
  235. <section1 topic='Acknowledgements' anchor='ack'>
  236. <p>Thanks to Dave Cridland and Ralph Meijer for their feedback.</p>
  237. </section1>
  238. </xep>