diff --git a/xep-0060.xml b/xep-0060.xml index d4239984..60792181 100644 --- a/xep-0060.xml +++ b/xep-0060.xml @@ -589,20 +589,22 @@ And by opposing end them?

The requirements for the publish-subscribe protocol imply that there are two major dimensions along which we can measure events: persistent vs. transient, and pure notification vs. inclusion of payload. An implementation SHOULD enable an owner to configure a node along both of these dimensions.

No matter whether a node is configured for persistent or transient events, a service MAY cache the last item published to the node, in which case it SHOULD send that item to subscribers based on configuration of the "send_last_published_item" option (see the Item Caching section of this document); if the service supports the "http://jabber.org/protocol/pubsub#last-published" feature then the value of this option MUST default to "on_sub_and_presence" (though the service SHOULD allow the node owner to override the default).

A pubsub service MUST validate publish requests against the configuration of the node along both of these dimensions (see the Publish An Item to a Node section of this document for the relevant error conditions).

-

Whether an item must be provided by the publisher, and whether an item ID is provided by the publisher or generated by the pubsub service, depends on the type of event being published. We can summarize the relevant rules as follows:

- - +

The node configuration and desired event type determine whether an item must be provided by the publisher, whether the item includes a payload in the publish request or notification, and whether an item ID is provided by the publisher or generated by the pubsub service. We can summarize the relevant rules as follows:

+
 NotificationPayload
+ - - - + + + - - - + + +
 Notification-Only Node *Payload-Included Node *
PersistentPublisher MUST include an &ITEM; element, which MAY be empty or contain a payload; if item ID is not provided by publisher, it MUST be generated by pubsub servicePublisher MUST include an &ITEM; element that contains the payload; if item ID is not provided by publisher, it MUST be generated by pubsub servicePersistent Node **Publish request MUST include an &ITEM; element, which MAY be empty or MAY contain a payload; even if publish request contains a payload, pubsub service MUST NOT include the payload in notifications; if publish request did not include item ID, pubsub service MUST generate item IDPublish request MUST include an &ITEM; element, which SHOULD contain a payload; if publish request included a payload, notifications MUST include the payload; if publish request did not include item ID, pubsub service MUST generate item ID
TransientPublisher MUST NOT include an &ITEM; element (therefore item ID is neither provided nor generated) but the notification will include an empty &ITEMS; elementPublisher MUST include an &ITEM; element that contains the payload, but the item ID is OPTIONALTransient Node **Publish request MUST NOT include an &ITEM; element; payload is not included in publish request or notifications, although notifications MUST include an empty &ITEMS; element; item ID is neither provided in publish request nor generated by pubsub servicePublish request MUST include an &ITEM; element, which SHOULD contain a payload; if publish request included a payload, notifications MUST include the payload; pubsub service MAY generate an item ID
+

* Note: Whether the node is notification-only or includes payloads is determined by the "pubsub#deliver_payloads" configuration field.

+

** Note: Whether the node is persistent or transient is determined by the "pubsub#persist_items" configuration field.