Details

      Description

      In the XEP-0060, one can read in section 5.3:


      Note: If a node has an identity type of "leaf", then it MUST NOT contain other nodes or collections (only items); if a node has an identity type of "collection", then it MUST NOT contain items (only other nodes or collections).


      So a node cannot be both a leaf and a collection. Yet I discovered a case in ejabberd (last version: 2.0.1) where a node is both. If I make a query "disco#info" on this node, I get:

      <iq type="get" from="test [at] zemarmot net/Gajim" to="pubsub.zemarmot.net"
      id="nodes1">
      <query xmlns="http://jabber.org/protocol/disco#info"
      node="/home/zemarmot.net/test/blog"/>
      </iq>

      <iq from='pubsub.zemarmot.net' to='test [at] zemarmot net/Gajim' id='nodes1'
      type='result'>
      <query xmlns='http://jabber.org/protocol/disco#info'
      node='/home/zemarmot.net/test/blog'>
      <identity category='pubsub' type='leaf'/>
      <identity category='pubsub' type='collection'/>
      <feature var='http://jabber.org/protocol/pubsub'/>
      <feature var='http://jabber.org/protocol/pubsub#access-open'/>
      <feature var='http://jabber.org/protocol/pubsub#collections'/>
      <feature var='http://jabber.org/protocol/pubsub#config-node'/>
      <feature var='http://jabber.org/protocol/pubsub#create-and-configure'/>
      <feature var='http://jabber.org/protocol/pubsub#last-published'/>
      <feature var='http://jabber.org/protocol/pubsub#presence-notifications'/>
      <feature var='http://jabber.org/protocol/pubsub#presence-subscribe'/>
      <feature var='http://jabber.org/protocol/pubsub#publisher-affiliation'/>
      <feature var='http://jabber.org/protocol/pubsub#retrieve-default'/>
      <feature var='http://jabber.org/protocol/pubsub#create-nodes'/>
      <feature var='http://jabber.org/protocol/pubsub#auto-create'/>
      <feature var='http://jabber.org/protocol/pubsub#delete-nodes'/>
      <feature var='http://jabber.org/protocol/pubsub#instant-nodes'/>
      <feature var='http://jabber.org/protocol/pubsub#item-ids'/>
      <feature var='http://jabber.org/protocol/pubsub#manage-subscriptions'/>
      <feature var='http://jabber.org/protocol/pubsub#modify-affiliations'/>
      <feature var='http://jabber.org/protocol/pubsub#outcast-affiliation'/>
      <feature var='http://jabber.org/protocol/pubsub#persistent-items'/>
      <feature var='http://jabber.org/protocol/pubsub#publish'/>
      <feature var='http://jabber.org/protocol/pubsub#purge-nodes'/>
      <feature var='http://jabber.org/protocol/pubsub#retract-items'/>
      <feature var='http://jabber.org/protocol/pubsub#retrieve-affiliations'/>
      <feature var='http://jabber.org/protocol/pubsub#retrieve-items'/>
      <feature var='http://jabber.org/protocol/pubsub#retrieve-subscriptions'/>
      <feature var='http://jabber.org/protocol/pubsub#subscribe'/>
      <feature
      var='http://jabber.org/protocol/pubsub#subscription-notifications'/>
      </query>
      </iq>

      For information, I made it by creating a leaf node /home/zemarmot.net/test/blog, then I published to /home/zemarmot.net/test/blog/posts. "posts" leaf subnode has been automatically created and "blog" node became a collection node as well as leaf node. I don't know what would have happened if I would have explicitely created a node both leaf and collection. Not made the test.

        Issue Links

          Activity

          Hide
          cromain@process-one.net Christophe Romain added a comment -

          fix will be part of work to make pubsub 1.12 compliant

          Show
          cromain@process-one.net Christophe Romain added a comment - fix will be part of work to make pubsub 1.12 compliant
          Hide
          cromain@process-one.net Christophe Romain added a comment -

          collection node implementation is available now, EJAB-815 should fix that issue (to be checked)

          Show
          cromain@process-one.net Christophe Romain added a comment - collection node implementation is available now, EJAB-815 should fix that issue (to be checked)
          Hide
          cromain@process-one.net Christophe Romain added a comment -

          preliminary commit of EJAB-815 is available in trunk
          using nodetree_dag with node_dag should avoid node being both collection and leaf, to comply the collection node xep.
          with nodetree_tree and node_hometree, the current behavior will not be changed.

          Show
          cromain@process-one.net Christophe Romain added a comment - preliminary commit of EJAB-815 is available in trunk using nodetree_dag with node_dag should avoid node being both collection and leaf, to comply the collection node xep. with nodetree_tree and node_hometree, the current behavior will not be changed.
          Hide
          cromain@process-one.net Christophe Romain added a comment -

          solved using nodetree_dag and node_dag

          Show
          cromain@process-one.net Christophe Romain added a comment - solved using nodetree_dag and node_dag

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development