[Standards] PubSub questions: Modification of Items? Combining "configure" forms?

Nick Parker nickp at bu.edu
Sat Jan 20 20:50:26 UTC 2007


Hi, I have two questions about PubSub:

1) Is there a way to modify the metadata stored in an Item? PubSub 
(XEP-0060) talks about modifying nodes, but doesn't mention how Items 
can be directly modified. I was thinking it'd something like this:

<iq type='set'
    from='juliet at capulet.com/balcony'
    to='pubsub.shakespeare.lit'
    id='publish1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='NODEID'>
      <item id='ITEMID'>
        <entry xmlns='URL'>
          [MODIFICATIONS HERE]
        </entry>
      </item>
    </publish>
  </pubsub>
</iq>

2) When configuring a Node, can two sets of form data be combined into 
the same "configure" request, or do they have to be sent separately? I'm 
assuming separate, but wanted to check for certain. Example of combined 
forms, with #node_config and #meta-data in the same request:

<iq type='set'
    from='juliet at capulet.com/balcony'
    to='pubsub.shakespeare.lit'
    id='create3'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <create node='NODEID'/>
    <configure>
      <x xmlns='jabber:x:data' type='submit'>
        <field var='FORM_TYPE' type='hidden'>
          <value>http://jabber.org/protocol/pubsub#node_config</value>
        </field>
        <field 
var='pubsub#collection'><value>juliets_sonnets</value></field>
        <field var='pubsub#node_type'><value>collection</value></field>
        <field var='FORM_TYPE' type='hidden'>
          <value>http://jabber.org/protocol/pubsub#meta-data</value>
        </field>
        <field var='pubsub#title'><value>Sonnets</value></field>
        <field var='pubsub#description'><value>Description</value></field>
      </x>
    </configure>
  </pubsub>
</iq>



More information about the Standards mailing list