[Standards] UPDATED: XEP-0363 (HTTP File Upload)

Dave Cridland dave at cridland.net
Mon Dec 4 17:04:34 UTC 2017

On 4 December 2017 at 10:37, Marcel Waldvogel
<marcel.waldvogel at uni-konstanz.de> wrote:
> I think this conversation boils down to whether XML validation or the
> Internet robustness principle ("Be conservative in what you send, be liberal
> in what you accept"?) have higher precedence. Has this been discussed (and
> maybe decided upon) before?

Loosely, no, this is not really Postel at play here, it's a pragmatic
approach to maximizing interoperability.

We want to:

a) Rely on an association between an XML namespace and a particular
set of semantics.
b) Avoid breaking compatibility unless required.

The solution we have come to is this:

1) We mint a namespace prefix, and attach a number '0' to it.
2) Adding elements or attributes is allowed (despite this changing the
XML Schema), as long as:
  i) The semantics of the protocol are unchanged if the element (or
attribute) is not present. That is, senders can ignore the existence
of the added syntax.
  ii) Receivers can ignore the presence of the attribute without harm.
  iii) From these, it also follows that the new XML Schema will
validate XML generated under the previous schema without error.
3) If either rule is broken, we update the number, which causes in XML
terms an entirely new namespace to be created.
4) Any unexpected attributes or elements, in any namespace (whether
the namespace itself is known or not) must be ignored.
  i) In XML Schema terms, this implies that to use the schemas, you
would need to scatter <xs:anyAttribute namespace='##targetNamespace'
process='skip'/> and <xs:any process='lax'> everywhere.
  ii) Note that this does *not* apply to unknown enumeration values
for known attributes or elements.
5) You cannot use XML Schemas with much of our protocol as anything
more than a guide, because we use unordered sets of child elements,
which are difficult to represent in XML Schemas (you can use xs:all,
but then you have to have only 0 or 1 of each element, and can't have
optional ones without making everything optional, and argh).


More information about the Standards mailing list