diff --git a/xep-0020.xml b/xep-0020.xml index cba76baa..0b3212a4 100644 --- a/xep-0020.xml +++ b/xep-0020.xml @@ -29,7 +29,7 @@ 1.5 2006-10-20 ip - Various updates and corrections avoiding material changes. + Added FORM_TYPEs to examples; added service-unavailable error and Security Considerations; various other updates and corrections avoiding material changes. 1.4 @@ -92,7 +92,7 @@

Features are negotiated though the exchange of &IQ; or &MESSAGE; stanzas containing <feature/> child elements qualified by the 'http://jabber.org/protocol/feature-neg' namespace. However, this <feature/> element is simply a wrapper for structured data encapsulated in the &xep0004; protocol. Earlier versions of this document defined a structured data format to handle the feature negotiation workflow; versions later than 0.4 use Data Forms, i.e., the 'jabber:x:data' namespace.

-

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 <feature/> 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".

+

In order to begin a negotation, the initiator sends an &IQ; stanza of type "get" (or a &MESSAGE; stanza type "normal" - see Chat Session Negotiation for examples) to the recipient with a single <feature/> 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".

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").

The following examples show some likely scenarios for feature negotiation between entities. Further examples can be found in using protocols, such as File Transfer.

@@ -104,8 +104,10 @@ id='neg1'> + + romantic_meetings + - @@ -113,7 +115,6 @@ - @@ -126,6 +127,9 @@ to='romeo@montague.net/orchard'> + + romantic_meetings + Secret Grotto @@ -136,24 +140,60 @@ ]]> -

If the responding entity does not support one or more of the features, it MUST return a &feature; error, and SHOULD specify the feature(s) not implemented in the XMPP <text/> element.

+

Note: If the responding entity does not want to reveal presence to the initiating entity for whatever reason then the responding entity's client SHOULD return a &unavailable; error (or return no response or error whatsoever if the offer was wrapped in a &MESSAGE; stanza) - see Security Considerations.

+

If the responding entity does not support Feature Negotiation or does not support the specified FORM_TYPE, it SHOULD also return a &unavailable; error:

+ + + + + romantic_meetings + + ... + + + + + + + ]]> +

If the responding entity does not support one or more of the features, it SHOULD return a &feature; error, and SHOULD specify the feature(s) not implemented in the XMPP <text/> element.

+ + + + romantic_meetings + + ... + + times-to-meet ]]> -

If the responding entity supports none of the options offered for one or more of the features, it MUST return a ¬acceptable; error, and SHOULD specify the relevant feature(s) in the XMPP <text/> element.

+

If the responding entity supports none of the options offered for one or more of the features, it SHOULD return a ¬acceptable; error, and SHOULD specify the relevant feature(s) in the XMPP <text/> element.

+ + + + romantic_meetings + + ... + + places-to-meet @@ -182,7 +222,7 @@ ... ]]> -

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 ®ISTRAR;. However, the requesting entity MAY also query the responding entity in order to determine which features are negotiable, as shown below.

+

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 ®ISTRAR;. However, the initiating entity MAY also query the responding entity in order to determine which features are negotiable, as shown below.

]]> -

If that feature is not negotiable, the responding entity MUST return a "Feature Not Implemented" error:

+

If that feature is not negotiable, the responding entity SHOULD return a "Feature Not Implemented" error:

- - - - - - + + ]]> -

If that feature is negotiable, the responding entity MUST return an appropriate negotiation form:

+

If that feature is negotiable, the responding entity SHOULD return an appropriate negotiation form:

+ + MUC + @@ -229,12 +268,12 @@ ]]> -

The requesting entity MAY then submit a data form containing the required information.

+

The initiating entity MAY then submit a data form containing the required information.

-

Security considerations are the responsibility of the using protocol.

+

If the responding entity responds to the initiating entity or returns an error (other than a &unavailable; response to an &IQ; request), the initiating entity will effectively discover the presence of the responding entity's resource. Due care must therefore be exercised in determining how to respond (or whether to respond at all to a &MESSAGE; request). For examples, the responding entity SHOULD NOT automatically (i.e. without first asking its human user) either respond to the initiating entity's request or return a specific error unless the initiating entity is subscribing to the responding entity's presence (and the responding entity's presence is not currently "invisible" to the initiating entity). Note: There should be no need for the responding entity's client to consult its block list, since if the initiating entity is on the list then the responding entity would not receive any requests from the initiating entity anyway.