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

Trejkaz trejkaz at trypticon.org
Wed Aug 17 00:31:33 UTC 2005


Quoting David Waite <dwaite at gmail.com>:
> No. Schema validity might be a matter of conformance, but there aren't
> very many options for a client or server to respond to invalid xml, no
> matter if it is a strict or loose schema. So, I'd prefer just a strict
> schema to model what I 'should' send, because I can't use the loose
> schema to really do anything.

A loose/strict scheme would work like this:
  * Implementations MUST conform to the loose schema.
  * Implementations SHOULD conform to the tight schema.

In other words, you can use the loose schema to determine what other
implementations might send to you, so that you can prepare for it.

But here's another question: Why do we have an ordering in the first place?
Is there actually a semantic difference between <username/><password/> and
<password/><username/>, or was it just done solely to make the schema harder
to conform to?  (Anyone using an automatic XML data binding would have had
no trouble, but anyone using DOM would be in for a small nightmare.)

As far as I can tell, we really do mean <xs:all> in almost all cases.

Anyway, I think the way to go is to make schemas in RELAX NG which are
normative, since it can probably cover any rules we throw at it... then 
convert
those schemas back to XSD format and make those ones informative since they're
likely to be approximations.

TX


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the Standards mailing list