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-0058.xml 6.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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>Multi-User Text Editing</title>
  10. <abstract>This document defines how several people may simultaneously edit text.</abstract>
  11. &LEGALNOTICE;
  12. <number>0058</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies/>
  17. <supersedes/>
  18. <supersededby/>
  19. <shortname>N/A</shortname>
  20. <author>
  21. <firstname>Alexey</firstname>
  22. <surname>Shchepin</surname>
  23. <email>alexey@sevcom.net</email>
  24. <jid>aleksey@jabber.ru</jid>
  25. </author>
  26. <revision>
  27. <version>0.1</version>
  28. <date>2002-11-12</date>
  29. <initials>as</initials>
  30. <remark>Initial version.</remark>
  31. </revision>
  32. </header>
  33. <section1 topic="Introduction">
  34. <p>
  35. This document defines an XMPP protocol extension for editing one text
  36. document by several people.
  37. This can be useful when several people write different parts of one single
  38. document, or one person edits the text and other people can see the
  39. changes.
  40. The advantage of using this protocol in compared to using a version
  41. control systems is that all changes are distributed between editors in
  42. real-time.
  43. </p>
  44. </section1>
  45. <section1 topic="Protocol description">
  46. <p>
  47. To start editing a file, the user must subscribe to it on special "server"
  48. The server stores text files. A User first can ask for list of these documents.
  49. </p>
  50. <example caption="User asks the server list of editable texts"><![CDATA[<iq type='get' to='server' id='mute1'>
  51. <list xmlns='http://jabber.org/protocol/mute#server'/>
  52. </iq>]]></example>
  53. <p>
  54. After that the server returns a list of the documents. For each list
  55. item an ID and description is given.
  56. </p>
  57. <example caption="Ancestor returns list of editable texts"><![CDATA[<iq type='result' to='editor1' id='mute1'>
  58. <list xmlns='http://jabber.org/protocol/mute#server'>
  59. <item id='id1' desc='Useful text'/>
  60. <item id='id2' desc='Useless text'/>
  61. </list>
  62. </iq>]]></example>
  63. <p>
  64. Then the user can send a subscribe request to the server by sending the documents ID.
  65. Attribute <tt>type</tt> can be <tt>rdwr</tt> for full access or
  66. <tt>rdonly</tt> for read-only access.
  67. </p>
  68. <example caption="User sends subscribe request"><![CDATA[<iq type='set' to='server' id='mute2'>
  69. <subscribe xmlns='http://jabber.org/protocol/mute#server'>
  70. <item id='id1' type='rdwr'/>
  71. </subscribe>
  72. </iq>]]></example>
  73. <example caption="Positive response from server on subscribe
  74. request"><![CDATA[<iq type='result' to='editor1' id='mute2'/>]]></example>
  75. <example caption="Negative response from server on subscribe
  76. request"><![CDATA[<iq type='error' to='editor1' id='mute2'>
  77. <subscribe xmlns='http://jabber.org/protocol/mute#server'>
  78. <item id='id1' type='rdwr'/>
  79. </subscribe>
  80. <error code="405">Not Allowed</error>
  81. </iq>]]></example>
  82. <p>
  83. After successful subscription, the server sends the full contents of the document to
  84. the new editor.
  85. </p>
  86. <example caption="Server sends text to editor"><![CDATA[<iq type='set' to='editor1' id='mute3'>
  87. <text xmlns='http://jabber.org/protocol/mute#editor' id='id1'>
  88. ...
  89. 8. Admin Use Cases
  90. 8.1. Banning a User
  91. 8.2. Modifying the Ban List
  92. 8.3. Granting Membership
  93. 8.4. Revoking Mambership
  94. 8.5. Modifying the Member List
  95. 8.6. Granting Moderator Privileges
  96. 8.7. Revoking Moderator Privileges
  97. 8.8. Modifying the Moderator List
  98. ...
  99. </text>
  100. </iq>]]></example>
  101. <example caption="Positive response from editor"><![CDATA[<iq type='result' to='server' id='mute3'/>]]></example>
  102. <p>
  103. If an editor wants to commit the changes he made, then he sends a patch file to this text
  104. in GNU diff(1) unified format without first two lines (they specify file
  105. names and modification dates, that is not needed).
  106. </p>
  107. <example caption="Editor sends patch to server"><![CDATA[<iq type='set' to='server' id='mute4'>
  108. <patch xmlns='http://jabber.org/protocol/mute#server' id='id1'>
  109. @@ -2,7 +2,7 @@
  110. 8.1. Banning a User
  111. 8.2. Modifying the Ban List
  112. 8.3. Granting Membership
  113. - 8.4. Revoking Mambership
  114. + 8.4. Revoking Membership
  115. 8.5. Modifying the Member List
  116. 8.6. Granting Moderator Privileges
  117. 8.7. Revoking Moderator Privileges
  118. </patch>
  119. </iq>]]></example>
  120. <example caption="Server accepts patch"><![CDATA[<iq type='result' to='editor1' id='mute4'/>]]></example>
  121. <example caption="Server not accepts patch"><![CDATA[<iq type='error' to='editor1' id='mute4'>
  122. <patch xmlns='http://jabber.org/protocol/mute#server' id='id1'>
  123. @@ -2,7 +2,7 @@
  124. 8.1. Banning a User
  125. 8.2. Modifying the Ban List
  126. 8.3. Granting Membership
  127. - 8.4. Revoking Mambership
  128. + 8.4. Revoking Membership
  129. 8.5. Modifying the Member List
  130. 8.6. Granting Moderator Privileges
  131. 8.7. Revoking Moderator Privileges
  132. </patch>
  133. <error code="405">Not Allowed</error>
  134. </iq>]]></example>
  135. <p>
  136. If server accepts the patch, then it resends it to all subscribed text editors and readers.
  137. </p>
  138. <example caption="Server resend accepted patch to all editors and readers
  139. of this text"><![CDATA[<iq type='set' to='editor1' id='mute5'>
  140. <patch xmlns='http://jabber.org/protocol/mute#editor' id='id1'>
  141. @@ -2,7 +2,7 @@
  142. 8.1. Banning a User
  143. 8.2. Modifying the Ban List
  144. 8.3. Granting Membership
  145. - 8.4. Revoking Mambership
  146. + 8.4. Revoking Membership
  147. 8.5. Modifying the Member List
  148. 8.6. Granting Moderator Privileges
  149. 8.7. Revoking Moderator Privileges
  150. </patch>
  151. </iq>]]></example>
  152. <example caption="Positive response from editors and readers"><![CDATA[<iq type='result' to='server' id='mute5'/>]]></example>
  153. <p>
  154. If server receives an error IQ reply from one of the editors/readers on any of
  155. above requests, then it must remove him from subscribers list and may
  156. send a message to him about this.
  157. </p>
  158. </section1>
  159. <section1 topic="Formal Definitions">
  160. <example caption="DTD for http://jabber.org/protocol/mute#server"><![CDATA[<?xml version="1.0" encoding="UTF-8" ?>
  161. <!ELEMENT list ((item)*)>
  162. <!ELEMENT subscribe (item)>
  163. <!ELEMENT item EMPTY>
  164. <!ATTLIST item
  165. id CDATA #REQUIRED
  166. desc CDATA #IMPLIED
  167. type ( rdwr | rdonly ) #IMPLIED >
  168. <!ELEMENT patch (#PCDATA)>]]></example>
  169. <example caption="DTD for http://jabber.org/protocol/mute#editor"><![CDATA[<?xml version="1.0" encoding="UTF-8" ?>
  170. <!ELEMENT patch (#PCDATA)>
  171. <!ELEMENT text (#PCDATA)>]]></example>
  172. </section1>
  173. </xep>