Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XEP-0284: Various fixes, and add myself as an author #904

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
230 changes: 199 additions & 31 deletions xep-0284.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<abstract>This specification defines a protocol that enables two or more endpoints to collaboratively edit an XML object. The protocol is intended for use mainly over the Extensible Messaging and Presence Protocol (XMPP), either by existing instant messaging clients or by specialized editing clients. However, the protocol could also be used over a direct TCP connection rather than over XMPP.</abstract>
&LEGALNOTICE;
<number>0284</number>
<status>Deferred</status>
<status>Experimental</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
Expand All @@ -33,6 +33,18 @@
<surname>Pusateri</surname>
<email>[email protected]</email>
</author>
&linkmauve;
<revision>
<version>0.1.3</version>
<date>2020-03-10</date>
<initials>egp</initials>
<remark><ul>
<li>Fix the registrar section.</li>
<li>Format the glossary better.</li>
<li>Add missing &lt;state/&gt; wrappers in examples.</li>
<li>Write an XML Schema.</li>
</ul></remark>
</revision>
<revision>
<version>0.1.2</version>
<date>2019-11-23</date>
Expand Down Expand Up @@ -175,11 +187,32 @@
</section1>

<section1 topic='Glossary' anchor='glossary'>
<p>GUID: a Globally Unique Indentifier, used as the identifier for a shared editing session.</p>
<p>Host: The JID to which the SXE messages are sent for relaying to other members of the session; this can be the initiator of the session (e.g., in a one-to-one session or small multi-user session) or a multi-user chat room or specialized shared editing component.</p>
<p>RID: the Record ID given to a record when it is created.</p>
<p>State: In the context of a new user joining, the state refers to the set of records that describes the edited object, including all previous versions of each record. All entities involved in the session are REQUIRED to keep this state unless a specialized component handles user joins.</p>
<p>Weight: Primarily, the weight of a node is represented by the 'primary-weight' field of the corresponding record. Secondarily, if the values of the 'primary-weight' of two records are equal, the first differing characters of the rids are compared by their Unicode values. The higher the character the higher the weight of the node is.</p>
<dl>
<di>
<dt>GUID</dt>
<dd>A Globally Unique Indentifier, used as the identifier for a shared editing session.</dd>
</di>

<di>
<dt>Host</dt>
<dd>The JID to which the SXE messages are sent for relaying to other members of the session; this can be the initiator of the session (e.g., in a one-to-one session or small multi-user session) or a multi-user chat room or specialized shared editing component.</dd>
</di>

<di>
<dt>RID</dt>
<dd>the Record ID given to a record when it is created.</dd>
</di>

<di>
<dt>State</dt>
<dd>In the context of a new user joining, the state refers to the set of records that describes the edited object, including all previous versions of each record. All entities involved in the session are REQUIRED to keep this state unless a specialized component handles user joins.</dd>
</di>

<di>
<dt>Weight</dt>
<dd>Primarily, the weight of a node is represented by the 'primary-weight' field of the corresponding record. Secondarily, if the values of the 'primary-weight' of two records are equal, the first differing characters of the rids are compared by their Unicode values. The higher the character the higher the weight of the node is.</dd>
</di>
</dl>
</section1>

<section1 topic='Session Management' anchor='jingle'>
Expand Down Expand Up @@ -258,7 +291,7 @@
</jingle>
</iq>
]]></example>
<p>The responder indiciates the reason for refusing the session by including a "reason" element. The following reasons are suggested (see also <cite>XEP-0166</cite>):</p>
<p>The responder indiciates the reason for refusing the session by including a "reason" element. The following reasons are suggested (see also &xep0166;):</p>
<ul>
<li>alternative-session -- the responder already has an active session with the initiator and wishes to use that session instead.</li>
<li>decline -- the responder formally declines the session.</li>
Expand All @@ -279,7 +312,7 @@
<example caption='Service Discovery Request'><![CDATA[
<iq from='[email protected]/castle'
to='[email protected]/castle'
id='disco1'>
id='disco1'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
Expand All @@ -305,8 +338,8 @@
<sxe xmlns='urn:xmpp:sxe:0' session='851ba2' name='Marketing Materials'/>
</presence>
]]></example>
<p>Such presence can be broadcast or can be sent in the context of a multi-user chat room (see <cite>XEP-0045</cite>).</p>
<p>However, presence is not sent when operating in a serverless messaging environment (see <cite>XEP-0174</cite>). Instead, DNS TXT records are published. Two new key-value pairs are used to advertise a session id ("sxe_id") and session name ("sxe_name") when using serverless messaging.</p>
<p>Such presence can be broadcast or can be sent in the context of a multi-user chat room (see &xep0045;).</p>
<p>However, presence is not sent when operating in a serverless messaging environment (see &xep0174;). Instead, DNS TXT records are published. Two new key-value pairs are used to advertise a session id ("sxe_id") and session name ("sxe_name") when using serverless messaging.</p>
</section1>

<section1 topic='Connecting to a Session' anchor='connect'>
Expand Down Expand Up @@ -870,15 +903,17 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<sxe xmlns='urn:xmpp:sxe:0'
session='851ba2'
id='11'>
<new type='element'
name='path'
parent='GUID1'
rid='GUID4' />
<new type='attr'
name='d'
parent='GUID4'
rid='GUID5'
chdata='M10 10L30 50L50 10Z' />
<state>
<new type='element'
name='path'
parent='GUID1'
rid='GUID4' />
<new type='attr'
name='d'
parent='GUID4'
rid='GUID5'
chdata='M10 10L30 50L50 10Z' />
</state>
</sxe>
</message>
]]></example>
Expand Down Expand Up @@ -907,8 +942,10 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<sxe xmlns='urn:xmpp:sxe:0'
session='851ba2'
id='13'>
<remove target='GUID5'/>
<remove target='GUID4'/>
<state>
<remove target='GUID5'/>
<remove target='GUID4'/>
</state>
</sxe>
</message>
]]></example>
Expand Down Expand Up @@ -981,14 +1018,16 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
session='851ba2'
id='14'>

<set target='GUID14'
version='1'
chdata='10' />
<state>
<set target='GUID14'
version='1'
chdata='10' />

<set target='GUID8'
version='1'
parent='GUID1'
primary-weight='8' />
<set target='GUID8'
version='1'
parent='GUID1'
primary-weight='8' />
</state>

</sxe>
</message>
Expand Down Expand Up @@ -1038,7 +1077,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
</ul>
</section2>
<section2 topic='Service Discovery Identities' anchor='registrar-identity'>
<p>The &amp;REGISTRAR; shall add the type of "sxe" to the "collaboration" category in its registry of service discovery identities.</p>
<p>The &REGISTRAR; shall add the type of "sxe" to the "collaboration" category in its registry of service discovery identities.</p>
</section2>
<section2 topic='Jingle Transport Methods' anchor='registrar-transports'>
<p>The XMPP Registrar shall include "sxe" in its registry of Jingle transport methods. The registry submission is as follows:</p>
Expand All @@ -1047,14 +1086,143 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<name>sxe</name>
<desc>A method for exchanging Shared XML Editing data over XMPP.</desc>
<type>reliable</type>
<doc>XEP-xxxx</doc>
<doc>XEP-0284</doc>
</transport>
]]></code>
</section2>
</section1>

<section1 topic='XML Schema' anchor='schema'>
<p>To follow.</p>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
xmlns='urn:xmpp:sxe:0'
targetNamespace='urn:xmpp:sxe:0'
elementFormDefault='qualified'>

<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
XEP-0284: http://xmpp.org/extensions/xep-0284.html
</xs:documentation>
</xs:annotation>

<xs:element name='sxe'>
<xs:complexType>
<xs:choice minOccurs='0'>
<xs:element ref='connect'/>
<xs:element ref='state-offer'/>
<xs:element ref='accept-state'/>
<xs:element ref='refuse-state'/>
<xs:element ref='state'/>
</xs:choice>
<xs:attribute name='session' type='xs:string' use='required'/>
<!-- TODO: Make this required. -->
<xs:attribute name='id' type='xs:string' use='optional'/>
<!-- TODO: Find a better way to advertise sessions in presence. -->
<xs:attribute name='name' type='xs:string' use='optional'/>
</xs:complexType>
</xs:element>

<xs:element name='connect' type='empty'/>

<xs:element name='state-offer'>
<xs:complexType>
<xs:choice>
<xs:any processContents='lax' namespace='##other'/>
</xs:choice>
</xs:complexType>
</xs:element>

<xs:element name='accept-state' type='empty'/>

<xs:element name='refuse-state' type='empty'/>

<xs:element name='state'>
<xs:complexType>
<xs:sequence maxOccurs='unbounded'>
<xs:element ref='document-begin' minOccurs='0' maxOccurs='unbounded'/>
<xs:element ref='document-end' minOccurs='0' maxOccurs='unbounded'/>
<xs:element ref='new' minOccurs='0' maxOccurs='unbounded'/>
<xs:element ref='remove' minOccurs='0' maxOccurs='unbounded'/>
<xs:element ref='set' minOccurs='0' maxOccurs='unbounded'/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name='document-begin'>
<xs:complexType>
<xs:attribute name='prolog' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>

<xs:element name='document-end'>
<xs:complexType>
<xs:attribute name='last-sender' type='xs:string' use='required'/>
<xs:attribute name='last-id' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>

<xs:element name='new'>
<xs:complexType>
<xs:attribute name='rid' type='xs:string' use='required'/>
<xs:attribute name='type' type='type' use='required'/>
<xs:attribute name='version' type='xs:nonNegativeInteger' use='optional'/>
<xs:attribute name='parent' type='xs:string' use='optional'/>
<xs:attribute name='primary-weight' type='xs:float' use='optional'/>
<xs:attribute name='ns' type='xs:string' use='optional'/>
<xs:attribute name='name' type='xs:string' use='optional'/>
<xs:attribute name='chdata' type='xs:string' use='optional'/>
<xs:attribute name='pitarget' type='xs:string' use='optional'/>
<xs:attribute name='pidata' type='xs:string' use='optional'/>
<!-- TODO: make these JIDs. -->
<xs:attribute name='creator' type='xs:string' use='optional'/>
<xs:attribute name='last-modified-by' type='xs:string' use='optional'/>
</xs:complexType>
</xs:element>

<xs:simpleType name='type'>
<xs:restriction base='xs:string'>
<xs:enumeration value='element'/>
<xs:enumeration value='attr'/>
<xs:enumeration value='text'/>
<xs:enumeration value='comment'/>
<xs:enumeration value='processinginstruction'/>
</xs:restriction>
</xs:simpleType>

<xs:element name='remove'>
<xs:complexType>
<xs:attribute name='target' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>

<xs:element name='set'>
<xs:complexType>
<xs:attribute name='target' type='xs:string' use='required'/>
<xs:attribute name='version' type='xs:nonNegativeInteger' use='required'/>
<xs:attribute name='parent' type='xs:string' use='optional'/>
<xs:attribute name='primary-weight' type='xs:float' use='optional'/>
<xs:attribute name='ns' type='xs:string' use='optional'/>
<xs:attribute name='name' type='xs:string' use='optional'/>
<xs:attribute name='chdata' type='xs:string' use='optional'/>
<xs:attribute name='pitarget' type='xs:string' use='optional'/>
<xs:attribute name='pidata' type='xs:string' use='optional'/>
<xs:attribute name='replacefrom' type='xs:nonNegativeInteger' use='optional'/>
<xs:attribute name='replacen' type='xs:nonNegativeInteger' use='optional'/>
</xs:complexType>
</xs:element>

<xs:simpleType name='empty'>
<xs:restriction base='xs:string'>
<xs:enumeration value=''/>
</xs:restriction>
</xs:simpleType>

</xs:schema>
]]></code>
</section1>

<section1 topic='Acknowledgements' anchor='acknowledgements'>
Expand Down