My comments inline as [BP]. On 12/10/11 8:55 AM, "Hannes Tschofenig" <[email protected]> wrote:
>Hi Bala, > >Here is my view: > >1) the schema never expresses all constraints since it is not powerful >enough to describe them. For simpler tasks it is not useful to describe >all constraints in a schema since otherwise the schema becomes unreadable. [BP] Please point to an example constraint a schema can't express. I know of a few but those are extremely rare. Schemas don't have to be "human readable". Schemas are meant to be read by machines and processed by machines. And machines are pretty good at processing "complex" algorithms. > >2) nobody! validates instance documents (in a protocol) when receiving >messages against the schema (since you have to do the input validation >anyway). [BP] That's too general of a statement. I know of a few implementations (including our own) that do very strict validation of incoming XML messages against their schemas. Otherwise, you are setting yourselves up against rogue attacks/crashes. > > >2) when you extend the schema, which is a core concept in protocol design >to design them with extension points, then in almost all of the cases I >have seen validation does not work anymore because the extended schema is >not validated, i.e. it verifies as correct. [BP] When you extend schemas, the "old" deployments by definition cannot validate the new elements/attributes but the "new" deployments (that were written after the schema extensions) do validate against the schema. > > >Even worse, since most people are not super skilled with writing XML >schemas their protocol design is essentially guided with what they are >able to express in the XML schema. [BP] All of the XEPs are peer-reviewed and hopefully even if the authors are not "XML/Schema experts" (It isn't that hard to learn it) they can get help from others in the community for writing the schemas. I'd gladly volunteer. > > >Ciao >Hannes > > > >On Dec 9, 2011, at 8:05 PM, Bala Pitchandi wrote: > >> I strongly disagree that XSD (RelaxNG or any other way of specifying >>the structure of the XML messages) is a "waste of time". If you don't >>have a schema, you'll either end up implementing all the validation >>manually or worse crash on invalid input. XSD parser-validators (they >>exist) do all that work for you, and are optimized to do that. >> >> Without a schema, all we have is the text and examples which could be >>interpreted in many ways by how they are written and how they are >>understood by the reader. >> >> Requiring a schema also forces the XEP authors to think hard and come >>up with a design that's structured, extensible (Yes, XSD schemas can be >>made extensible). >> >> -- Bala >> >> -----Original Message----- >> From: [email protected] [mailto:[email protected]] On >>Behalf Of Hannes Tschofenig >> Sent: Friday, December 09, 2011 12:36 PM >> To: XMPP Standards >> Subject: Re: [Standards] Schemas in XEPs >> >> Hi Dave, >> >> Over the time I have gotten the impression that an XML schema is really >>a waste of time. It creates the illusion that there is something that >>provides help (to implementers and to those who read the specification) >>but in reality it doesn't. >> >> Working on different specifications I later thought that the problem is >>with the readability and extensibility of the XML schema and then we >>switched to Relax NG in some IETF working groups. That turned to be a >>mistake as well. When it comes to extensibility a Relax NG schema is >>equally bad. >> >> The extensibility mechanism of XML would prevent you from getting any >>meaningful validation anyway. So, validation isn't useful because more >>or less everything validates (after you add the extension points >>everywhere). >> >> So, I believe we are doing fine without XML schema but with lots of >>examples. Implementers just look at examples. >> >> Maybe you could therefore recommend not to use XML schemas (or Relax NG >>schemas). >> >> Ciao >> Hannes >> >> On Dec 9, 2011, at 6:24 PM, Dave Cridland wrote: >> >>> On Thu Dec 8 23:13:38 2011, Matthew A. Miller wrote: >>>> I'd like to point out that all of our XML Schemas are non-normative. >>>>They're provided for informational use, and ought not be considered >>>>the absolute record of authority. >>> >>> What follows is my understanding; we should probably have this >>>documented somewhere (a Tao Of XSF XEP?): >>> >>> - The schemas in XEPs are not normative. >>> - We do, however, try to keep them aligned properly with the text, and >>>will accept bug reports with gratitude. >>> - The schemas in RFCs *are* normative. >>> - The IETF does, however, accept errata should they not match the text >>>or the intent. >>> >>> So in both cases, we'd expect the schemas to be right, and welcome >>>fixes; technically, though, there's a distinction in normativeness >>>(normativity?) between RFC and XEP. >>> >>> Dave. >>> -- >>> Dave Cridland - mailto:[email protected] - xmpp:[email protected] >>> - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/ >>> - http://dave.cridland.net/ >>> Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade >> >
