1.5 RC1 various corrections and improvements

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@119 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Ian Paterson 2006-10-20 17:38:00 +00:00
parent 8f061f2253
commit ecf74449f7
1 changed files with 17 additions and 31 deletions

View File

@ -25,6 +25,12 @@
</schemaloc>
&pgmillard;
&stpeter;
<revision>
<version>1.5</version>
<date>2004-10-20</date>
<initials>ip</initials>
<remark>Various updates and corrections avoiding material changes.</remark>
</revision>
<revision>
<version>1.4</version>
<date>2004-05-21</date>
@ -81,14 +87,14 @@
</revision>
</header>
<section1 topic="Introduction" anchor='intro'>
<p>A discovery protocol such as &xep0030; enables Jabber entities to query other entities regarding the features they support, but does not provide a means for the two entities to negotiate specific options related to the advertised features (e.g., specific methods of file transfer such as &xep0047; or &xep0065;).</p>
<p>The protocol defined herein enables Jabber entities to negotiate options for specific features. These features could be negotiated between any two endpoints on the Jabber network, such as two clients, a client and a component, two components, a client and a server, or two servers. The protocol is generic enough that it can be used whenever options need to be negotiated between two Jabber entities.</p>
<p>A discovery protocol such as &xep0030; enables Jabber entities to query other entities regarding the features they support, but does not provide a means for the two entities to negotiate specific options related to the advertised features.</p>
<p>The protocol defined herein enables Jabber entities to negotiate options for specific features. These features could be negotiated between any two endpoints on the Jabber network, such as two clients, a client and a component, two components, a client and a server, or two servers. The protocol is generic enough that it can be used whenever options need to be negotiated between two Jabber entities. For examples, &xep0095;, &xep0096; or &xep0155;.</p>
</section1>
<section1 topic="Protocol Details" anchor='protocol'>
<p>Features are negotiated though the exchange of &IQ; stanzas containing &QUERY; child elements qualified by the 'http://jabber.org/protocol/feature-neg' namespace. However, this &QUERY; element is simply a wrapper for structured data encapsulated in the &xep0004; protocol. <note>Earlier versions of this document defined an structured data format to handle the feature negotiation workflow; versions later than 0.4 use <strong>Data Forms</strong>, i.e., the 'jabber:x:data' namespace.</note></p>
<p>In order to begin a negotation, the initiator sends an &IQ; stanza of type "get" to the recipient with a single &lt;feature/&gt; element containing a data form of type "form" which defines the available options for one or more features. Each feature is represented as an x-data "field", which MUST be of type "list-single" as specified in XEP-0004.</p>
<p>The recipient SHOULD examine each feature and the options provided. In order to indicate preferred options, the recipient then SHOULD specify one option for each feature and return a data form of type "submit" to the initiator in an &IQ; stanza of type "result".</p>
<p>The following examples show some likely scenarios for feature negotiation between entities. Further examples can be found in using protocols, such as &xep0096;.</p>
<p>Features are negotiated though the exchange of &IQ; or &MESSAGE; stanzas containing &lt;feature/&gt; child elements qualified by the 'http://jabber.org/protocol/feature-neg' namespace. However, this &lt;feature/&gt; element is simply a wrapper for structured data encapsulated in the &xep0004; protocol. <note>Earlier versions of this document defined a structured data format to handle the feature negotiation workflow; versions later than 0.4 use <cite>Data Forms</cite>, i.e., the 'jabber:x:data' namespace.</note></p>
<p>In order to begin a negotation, the initiator sends an &IQ; stanza of type "get" (or a &MESSAGE; stanza type "normal") to the recipient with a single &lt;feature/&gt; element containing a data form of type "form" which defines the available options for one or more features. Each feature is represented as an x-data "field".</p>
<p>The recipient SHOULD examine each feature and the values of the options provided. In order to indicate preferred values, the recipient then SHOULD specify one value for each feature and return a data form of type "submit" to the initiator in an &IQ; stanza of type "result" (or a &MESSAGE; stanza type "normal").</p>
<p>The following examples show some likely scenarios for feature negotiation between entities. Further examples can be found in using protocols, such as <cite>File Transfer</cite>.</p>
<section2 topic="Basic Flow" anchor='protocol-basic'>
<p>A typical negotiation flow is shown in the following example of two entities negotiating the time and place for a meeting.</p>
<example caption="Initiating entity sends offer"><![CDATA[
@ -142,7 +148,7 @@
</error>
</iq>
]]></example>
<p>If the responding entity supports none of the options offered for a certain feature, it MUST return a &notacceptable; error, and SHOULD specify the relevant feature in the XMPP &lt;text/&gt; element.</p>
<p>If the responding entity supports none of the options offered for one or more of the features, it MUST return a &notacceptable; error, and SHOULD specify the relevant feature(s) in the XMPP &lt;text/&gt; element.</p>
<example caption="Responding entity supports no options"><![CDATA[
<iq type='error'
from='juliet@jabber.org/balcony'
@ -156,7 +162,7 @@
]]></example>
</section2>
<section2 topic="Querying for Negotiable Features" anchor='protocol-query'>
<p>If at least one feature offered by an entity is subject to &xep0020;, the entity's response to a service discovery information request MUST include &lt;feature var='http://jabber.org/protocol/feature-neg'/&gt; as one of the features.</p>
<p>If at least one feature offered by an entity is subject to <strong>Feature Negotiation</strong>, the entity's response to a service discovery information request MUST include &lt;feature var='http://jabber.org/protocol/feature-neg'/&gt; as one of the features.</p>
<example caption='Client queries a chatroom for supported features'><![CDATA[
<iq type='get'
from='juliet@capulet.com/balcony'
@ -176,27 +182,7 @@
...
</query>
</iq>]]></example>
<p>The using protocol (in these examples, &xep0045;) SHOULD specify which features might be negotiable, either in the relevant documentation or in the entry for that feature in the service discovery features registry maintained by the XMPP Registrar. However, the requesting entity MAY also query the responding entity in order to determine which features are negotiable, as shown below.</p>
<example caption='Client queries a chatroom for supported features'><![CDATA[
<iq type='get'
from='juliet@capulet.com/balcony'
to='balconyscene@plays.shakespeare.lit'
id='neg1'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>]]></example>
<example caption='Chatroom returns supported features'><![CDATA[
<iq type='result'
from='balconyscene@plays.shakespeare.lit'
to='juliet@capulet.com/balcony'
id='neg1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='http://jabber.org/protocol/feature-neg'/>
<feature var='muc-password'/>
...
</query>
</iq>]]></example>
<p>The using protocol (in these examples, <cite>XEP-0045</cite>) SHOULD specify which features might be negotiable, either in the relevant documentation or in the entry for that feature in the service discovery features registry maintained by the XMPP Registrar (see &lt;<link url='http://www.jabber.org/registrar/disco-vars.html'>http://www.jabber.org/registrar/disco-vars.html</link>&gt;). However, the requesting entity MAY also query the responding entity in order to determine which features are negotiable, as shown below.</p>
<p>The using protocol (in these examples, &xep0045;) SHOULD specify which features might be negotiable, either in the relevant documentation or in the entry for that feature in the service discovery features registry maintained by the &REGISTRAR;. However, the requesting entity MAY also query the responding entity in order to determine which features are negotiable, as shown below.</p>
<example caption='Client queries chatroom regarding options for a negotiable feature'><![CDATA[
<iq type='get'
from='juliet@capulet.com/balcony'
@ -256,7 +242,7 @@
</section1>
<section1 topic="XMPP Registrar Considerations" anchor='registrar'>
<p>In order for Jabber entities to adequately leverage <strong>Data Forms</strong> (e.g., by using machine-readable fields), it is RECOMMENDED to register standard x-data fields with the &REGISTRAR; via the mechanisms defined in &xep0068;. Whether to do so for any given features and options shall be determined by the using protocol.</p>
<p>In order for Jabber entities to adequately leverage <strong>Data Forms</strong> (e.g., by using machine-readable fields), it is RECOMMENDED to register standard x-data fields with the <cite>XMPP Registrar</cite> via the mechanisms defined in &xep0068;. Whether to do so for any given features and options shall be determined by the using protocol.</p>
</section1>
<section1 topic='XML Schema' anchor='schema'>