Pubsub bug in xep-0060 on new nodes

Problem description (bug report):

When setting a new node using pubsub (this node has never been set before), the server sends back an incorrect (doesn’t completely follow the xep-0060 standard). For example: I get this as a response:

however, xep-0060 says we must get

– from xep-0060

<xs:element name='items'>
        <xs:element ref='item' minOccurs='0' maxOccurs='unbounded'/>
        <xs:element ref='retract' minOccurs='0' maxOccurs='unbounded'/>
      <xs:attribute name='node' type='xs:string' use='required'/>

So, items needs to have node="scene" in my example.
an example of what it should look like is in Notification Without Payload

When creating a new node, set a breakpoint in

In, we could add the required attrib to items with a few lines of code.

Here is a quick fix, replace this method with this new code:

void childNodeAdded(Node child) {
// Build packet to broadcast to subscribers
Message message = new Message();
Element event = message.addChildElement(“event”, “”);
Element items = event.addElement(“items”).addAttribute(“node”,child.getNodeID());
Element item = items.addElement(“item”);
item.addAttribute(“id”, child.getNodeID());
if (deliverPayloads) {
// Broadcast event notification to subscribers
broadcastCollectionNodeEvent(child, message);

The only reason this bug is really bad is because Smack’s use of the XmppPullParser fails on the validation of this packet, therefore shutting down my connection. Otherwise, I could simply ignore this response.

Any other suggestions or comments? Is my bug valid?