Uploaded image for project: 'Smack'
  1. Smack
  2. SMACK-674

PubSub Affiliation extension element is missing 'jid' attribute, and is using wrong element name 'subscription'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.2.0
    • Component/s: Extensions
    • Labels:

      Description

      <affiliation/> has 3 attributes: 'node', 'jid', and 'affiliation' depending on which namespace the element is in.

      From pubsub

      <xs:element name='affiliation'>
      <xs:complexType>
      <xs:simpleContent>
      <xs:extension base='empty'>
      <xs:attribute name='affiliation' use='required'>
      <xs:simpleType>
      <xs:restriction base='xs:NCName'>
      <xs:enumeration value='member'/>
      <xs:enumeration value='none'/>
      <xs:enumeration value='outcast'/>
      <xs:enumeration value='owner'/>
      <xs:enumeration value='publisher'/>
      <xs:enumeration value='publish-only'/>
      </xs:restriction>
      </xs:simpleType>
      </xs:attribute>
      <xs:attribute name='node' type='xs:string' use='required'/>
      </xs:extension>
      </xs:simpleContent>
      </xs:complexType>
      </xs:element>

      From pubsub#owner

      <xs:element name='affiliation'>
      <xs:complexType>
      <xs:simpleContent>
      <xs:extension base='empty'>
      <xs:attribute name='affiliation' use='required'>
      <xs:simpleType>
      <xs:restriction base='xs:NCName'>
      <xs:enumeration value='member'/>
      <xs:enumeration value='none'/>
      <xs:enumeration value='outcast'/>
      <xs:enumeration value='owner'/>
      <xs:enumeration value='publisher'/>
      <xs:enumeration value='publish-only'/>
      </xs:restriction>
      </xs:simpleType>
      </xs:attribute>
      <xs:attribute name='jid' type='xs:string' use='required'/>
      </xs:extension>
      </xs:simpleContent>
      </xs:complexType>
      </xs:element>

      It also appears that the name of the element generated by toXM() is wrong: It is 'subscription' when it should be 'affiliation'.

      Create static newOnerAffiliation(String, Type) and newAffiliation(String, Type) methods in Affiliation

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              flow Florian Schmaus
              Reporter:
              flow Florian Schmaus
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: