[Standards-JIG] sequence vs. choice in Jabber/XMPP schemas

Peter Saint-Andre stpeter at jabber.org
Thu Aug 18 22:49:00 UTC 2005


Peter Saint-Andre wrote:
> David Waite wrote:
> 
>> I vote for #1. Be strict in what you produce and liberal in what you
>> accept, right?
> 
> 
> The problem is that people are using the schemas to validate what they 
> accept, and the result right now is that their applications break.

In reviewing the jabber:client and jabber:server schemas just now (RFC 
3921), I notice that they are loose about the order of child elements in 
message and presence:

           <xs:choice minOccurs='0' maxOccurs='unbounded'>
             <xs:element ref='subject'/>
             <xs:element ref='body'/>
             <xs:element ref='thread'/>
           </xs:choice>

         <xs:choice minOccurs='0' maxOccurs='unbounded'>
           <xs:element ref='show'/>
           <xs:element ref='status'/>
           <xs:element ref='priority'/>
         </xs:choice>

So the JEPs are more strict about this than the XMPP RFCs, which seems a 
bit backwards, eh?

I propose that we put the issue of loose vs. strict schemas before the 
Jabber Council once the new Council is installed (early September).

Peter

-- 
Peter Saint-Andre
Jabber Software Foundation
http://www.jabber.org/people/stpeter.shtml


More information about the Standards mailing list