On 12/9/2011 9:49 AM, Dave Cridland wrote:
On Fri Dec 9 17:35:47 2011, Hannes Tschofenig wrote:
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).
Or at least move them out of the XEP itself, perhaps?
I think we vaguely require them, at present. I'd be happy with hosting
them out of the XEP itself, which'd make them more obviously informative.
The XSF Board chair and the XMPP Council chair have been trying to
figure out how we go about such a decision, and decided the best thing
to do was seek consensus on the lists as a first step.
Dave.
Since I seemed to have re-opened this rather large can of worms, I'll
offer my own thoughts. I have actually found the schemas to be useful,
even though I understand their limitations. You just need to put their
value in the proper context.
And even though they are not normative, there is still some sort of
normative constraint for the XML, and to some extent the schemas do
capture that. Here's an example from XEP-0045, 6.4 Discovering Room Items:
"These <item/> elements are qualified by the disco#items namespace, not
the muc namespace; this means that they cannot possess 'affiliation' or
'role' attributes, for example."
One direction we could go with the schemas is to build schemas that will
not capture every normative constraint, but will catch most violations.
Not all invalid XML would be rejected by the schema, but valid XML would
never be rejected by the schema.
This would assign some normative value to the schemas and help us from
both a standards and interopability perspective. However, there will
always be some rules that schemas cannot cleanly capture, and for those
people will still need to read the RFCs and XEPs. (However, the one
major obstacle to that approach would be extension attributes [see RFC
6120, 8.4. Extended Content], though I don't know if there are any XEPs
which actually use those.)