[Standards] XEP-0149: Time Periods vs. XEP-0060

Christian Schudt christian.schudt at gmx.de
Fri Apr 4 18:46:26 UTC 2014



> I believe that the idea is to not treat the headers as payload. But it probably can cause incompatibility for servers that don't know about shim, so probably it would be really nicer to put it inside payload.

The problem I am having is that I implemented the item element with a *single* payload, which is fine with XEP-0060 and is in accordance with its XML Schema:

Object getPayload();

Now I am thinking if this should be changed to:

List<Object> getPayloads();

in order to allow for XEP-0149.

And you are right. It's hard for a server to decide, if it should return a invalid-payload error or not. At least an implementation must know about XEP-0149.
I am seeing a conflict here for a XEP-0149 capable client using a "pure" XEP-0060 server implementation.


>> XEP-0060's XML Schema also only allows for one payload.
> 
> Where do you see that? Could you please quote?


  <xs:element name='item'>
    <xs:complexType>
      <xs:sequence minOccurs='0'>
        <xs:any namespace='##other'/>
      </xs:sequence>
      <xs:attribute name='id' type='xs:string' use='optional'/>
    </xs:complexType>
  </xs:element>

Having no maxOccurs implies it is 1:
http://www.w3.org/TR/xmlschema-0/#OccurrenceConstraints








More information about the Standards mailing list