Skip to content

Commit 16d2c3a

Browse files
committed
XEP-0060: Release version 1.25.1
Add examples for publishing item without ID
1 parent 2c5b7a3 commit 16d2c3a

File tree

1 file changed

+46
-1
lines changed

1 file changed

+46
-1
lines changed

xep-0060.xml

+46-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@
5050
&pgmillard;
5151
&stpeter;
5252
&ralphm;
53+
<revision>
54+
<version>1.25.1</version>
55+
<date>2023-09-07</date>
56+
<initials>melvo</initials>
57+
<remark>
58+
<p>Add examples for publishing item without ID</p>
59+
</remark>
60+
</revision>
5361
<revision>
5462
<version>1.25.0</version>
5563
<date>2023-03-22</date>
@@ -2761,7 +2769,6 @@ And by opposing end them?
27612769
<li>Depending on the node configuration, the &lt;publish/&gt; element MAY contain no &ITEM; elements or one &ITEM; element. <note>The inclusion of more than one &ITEM; element is no longer allowed, given the removal of batch publishing from version 1.13 of this specification.</note> <note>It is not necessary for a publication request to include a payload or even an &ITEM; element in order to trigger an event notification. For example, the result of publishing to a transient, notification-only node will be an event notification that does not include even an &ITEM; element. However, for the sake of convenience we refer to the act of publication as "publishing an item" (rather than, say, "triggering an event notification") even though a publication request will not always contain an &ITEM; element.</note></li>
27622770
<li>The &lt;item/&gt; element provided by the publisher MAY possess an 'id' attribute, specifying a unique ItemID for the item. If an ItemID is not provided in the publish request, the pubsub service MUST generate one and MUST ensure that it is unique for that node.</li>
27632771
</ul>
2764-
<p>An example follows.</p>
27652772
<example caption='Publisher publishes an item with an ItemID'><![CDATA[
27662773
<iq type='set'
27672774
from='[email protected]/blogbot'
@@ -2789,6 +2796,34 @@ And by opposing end them?
27892796
</publish>
27902797
</pubsub>
27912798
</iq>
2799+
]]></example>
2800+
<example caption='Publisher publishes an item without an ItemID'><![CDATA[
2801+
<iq type='set'
2802+
from='[email protected]/blogbot'
2803+
to='pubsub.shakespeare.lit'
2804+
id='publish2'>
2805+
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
2806+
<publish node='princely_musings'>
2807+
<item>
2808+
<entry xmlns='http://www.w3.org/2005/Atom'>
2809+
<title>Soliloquy</title>
2810+
<summary>
2811+
To be, or not to be: that is the question:
2812+
Whether 'tis nobler in the mind to suffer
2813+
The slings and arrows of outrageous fortune,
2814+
Or to take arms against a sea of troubles,
2815+
And by opposing end them?
2816+
</summary>
2817+
<link rel='alternate' type='text/html'
2818+
href='http://denmark.lit/2003/12/13/atom03'/>
2819+
<id>tag:denmark.lit,2003:entry-32397</id>
2820+
<published>2003-12-13T18:30:02Z</published>
2821+
<updated>2003-12-13T18:30:02Z</updated>
2822+
</entry>
2823+
</item>
2824+
</publish>
2825+
</pubsub>
2826+
</iq>
27922827
]]></example>
27932828
</section3>
27942829
<section3 topic='Success Case' anchor='publisher-publish-success'>
@@ -2798,6 +2833,16 @@ And by opposing end them?
27982833
from='pubsub.shakespeare.lit'
27992834
to='[email protected]/blogbot'
28002835
id='publish1'>
2836+
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
2837+
<publish node='princely_musings'/>
2838+
</pubsub>
2839+
</iq>
2840+
]]></example>
2841+
<example caption='Service replies with success and the ID of the new item'><![CDATA[
2842+
<iq type='result'
2843+
from='pubsub.shakespeare.lit'
2844+
to='[email protected]/blogbot'
2845+
id='publish2'>
28012846
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
28022847
<publish node='princely_musings'>
28032848
<item id='ae890ac52d0df67ed7cfdf51b644e901'/>

0 commit comments

Comments
 (0)