mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-25 02:32:18 -05:00
added example of singleton node
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2230 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
b574d3202b
commit
f333f92abf
12
xep-0060.xml
12
xep-0060.xml
@ -5581,6 +5581,18 @@ O, what a rogue and peasant slave am I!
|
|||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Singleton Nodes' anchor='impl-singleton'>
|
<section2 topic='Singleton Nodes' anchor='impl-singleton'>
|
||||||
<p>For some nodes, it is desirable to have at most one item associated with the node at any one time (for example, a client may want to store its preferences using a node name that is a namespace controlled by that client). When this pattern is desired, it is RECOMMENDED for the publisher to specify an ItemID of "current" to ensure that the publication of a new item will overwrite the existing item.</p>
|
<p>For some nodes, it is desirable to have at most one item associated with the node at any one time (for example, a client may want to store its preferences using a node name that is a namespace controlled by that client). When this pattern is desired, it is RECOMMENDED for the publisher to specify an ItemID of "current" to ensure that the publication of a new item will overwrite the existing item.</p>
|
||||||
|
<example caption='Publishing to a Singleton Node'><![CDATA[
|
||||||
|
<iq type='set'
|
||||||
|
from='horatio@denmark.lit/mobile'
|
||||||
|
to='pubsub.shakespeare.lit'
|
||||||
|
id='single1'>
|
||||||
|
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||||
|
<publish node='elsinore-doorbell'>
|
||||||
|
<item id='current'/>
|
||||||
|
</publish>
|
||||||
|
</pubsub>
|
||||||
|
</iq>
|
||||||
|
]]></example>
|
||||||
</section2>
|
</section2>
|
||||||
</section1>
|
</section1>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user